diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-02-13 14:53:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-11 11:13:32 +0100 |
commit | 5d9b86dff687621cad7cd1a9075d35fc49ed96e1 (patch) | |
tree | 32d1088b404df2435e79177109057054ee2aedb0 | |
parent | c869d56cbafc6ae9b6ebadbc398519c38331a13c (diff) |
Update chromium + simplify snapshot
Simplifies our snapshoting and includes among other
files the chrome command-line preference store, which
we can use with minor adaptations.
Submodule src/3rdparty 07787da4..4ea22135:
> Fix build for expanded sources
> Merge "Merge remote-tracking branch 'origin/upstream-master' into 79-based" into 79-based
> Don't trigger quad blending for opacity
> FIXUP: Fix build with gcc 5
> [Backport] Allow restricted clock_nanosleep in Linux sandbox
Change-Id: Ibdf7b24c0fbe920edd61f550913dca02ed67cd20
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/core/command_line_pref_store_qt.cpp | 90 | ||||
-rw-r--r-- | src/core/command_line_pref_store_qt.h | 56 | ||||
-rw-r--r-- | src/core/core_chromium.pri | 2 | ||||
-rw-r--r-- | src/core/pref_service_adapter.cpp | 11 | ||||
-rw-r--r-- | src/core/profile_qt.cpp | 1 | ||||
-rw-r--r-- | src/core/qtwebengine_sources.gni | 3 | ||||
-rwxr-xr-x | tools/scripts/take_snapshot.py | 52 | ||||
-rw-r--r-- | tools/scripts/version_resolver.py | 2 |
9 files changed, 30 insertions, 187 deletions
diff --git a/src/3rdparty b/src/3rdparty -Subproject 07787da493d9a71b994582904a188a53aae9e47 +Subproject 4ea2213507a2317fef895a1ab473f9a2729d74a diff --git a/src/core/command_line_pref_store_qt.cpp b/src/core/command_line_pref_store_qt.cpp deleted file mode 100644 index 5c5c82e1a..000000000 --- a/src/core/command_line_pref_store_qt.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "command_line_pref_store_qt.h" - -#include "chrome/common/chrome_switches.h" -#include "components/proxy_config/proxy_config_dictionary.h" -#include "components/proxy_config/proxy_config_pref_names.h" -#include "content/public/common/content_switches.h" -#include <QDebug> - -CommandLinePrefStoreQt::CommandLinePrefStoreQt(const base::CommandLine *commandLine) - : CommandLinePrefStore(commandLine) -{ - - if (commandLine->HasSwitch(switches::kNoProxyServer)) { - SetValue(proxy_config::prefs::kProxy, - std::make_unique<base::Value>(ProxyConfigDictionary::CreateDirect()), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); - } else if (commandLine->HasSwitch(switches::kProxyPacUrl)) { - std::string pac_script_url = - commandLine->GetSwitchValueASCII(switches::kProxyPacUrl); - SetValue(proxy_config::prefs::kProxy, - std::make_unique<base::Value>(ProxyConfigDictionary::CreatePacScript( - pac_script_url, false)), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); - } else if (commandLine->HasSwitch(switches::kProxyAutoDetect)) { - SetValue(proxy_config::prefs::kProxy, - std::make_unique<base::Value>( - ProxyConfigDictionary::CreateAutoDetect()), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); - } else if (commandLine->HasSwitch(switches::kProxyServer)) { - std::string proxy_server = - commandLine->GetSwitchValueASCII(switches::kProxyServer); - std::string bypass_list = - commandLine->GetSwitchValueASCII(switches::kProxyBypassList); - SetValue( - proxy_config::prefs::kProxy, - std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers( - proxy_server, bypass_list)), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); - } - - if (commandLine->HasSwitch(switches::kNoProxyServer) && (commandLine->HasSwitch(switches::kProxyAutoDetect) || commandLine->HasSwitch(switches::kProxyServer) || commandLine->HasSwitch(switches::kProxyPacUrl) || commandLine->HasSwitch(switches::kProxyBypassList))) { - qWarning("Additional command-line proxy switches specified when --%s was also specified", - qPrintable(switches::kNoProxyServer)); - } -} - -CommandLinePrefStoreQt::~CommandLinePrefStoreQt() = default; diff --git a/src/core/command_line_pref_store_qt.h b/src/core/command_line_pref_store_qt.h deleted file mode 100644 index a509f8ca9..000000000 --- a/src/core/command_line_pref_store_qt.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef COMMAND_LINE_PREF_STORE_QT_H -#define COMMAND_LINE_PREF_STORE_QT_H - -#include "base/command_line.h" -#include "components/prefs/command_line_pref_store.h" - -class CommandLinePrefStoreQt : public CommandLinePrefStore -{ -public: - explicit CommandLinePrefStoreQt(const base::CommandLine *commandLine); - -protected: - ~CommandLinePrefStoreQt() override; - DISALLOW_COPY_AND_ASSIGN(CommandLinePrefStoreQt); -}; - -#endif // COMMAND_LINE_PREF_STORE_QT_H diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index b7180070b..ac118101a 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -50,7 +50,6 @@ SOURCES = \ clipboard_qt.cpp \ color_chooser_qt.cpp \ color_chooser_controller.cpp \ - command_line_pref_store_qt.cpp \ common/qt_ipc_logging.cpp \ common/qt_messages.cpp \ common/user_script_data.cpp \ @@ -157,7 +156,6 @@ HEADERS = \ client_cert_select_controller.h \ clipboard_change_observer.h \ clipboard_qt.h \ - command_line_pref_store_qt.h \ color_chooser_qt.h \ color_chooser_controller_p.h \ color_chooser_controller.h \ diff --git a/src/core/pref_service_adapter.cpp b/src/core/pref_service_adapter.cpp index a1ac5e912..4ded70d07 100644 --- a/src/core/pref_service_adapter.cpp +++ b/src/core/pref_service_adapter.cpp @@ -39,12 +39,13 @@ #include "pref_service_adapter.h" -#include "command_line_pref_store_qt.h" #include "profile_adapter.h" #include "type_conversion.h" #include "web_engine_context.h" +#include "chrome/browser/prefs/chrome_command_line_pref_store.h" #include "content/public/browser/browser_thread.h" +#include "components/language/core/browser/pref_names.h" #include "components/prefs/pref_member.h" #include "components/prefs/in_memory_pref_store.h" #include "components/prefs/json_pref_store.h" @@ -80,7 +81,7 @@ void PrefServiceAdapter::setup(const ProfileAdapter &profileAdapter) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); PrefServiceFactory factory; - factory.set_command_line_prefs(base::MakeRefCounted<CommandLinePrefStoreQt>( + factory.set_command_line_prefs(base::MakeRefCounted<ChromeCommandLinePrefStore>( WebEngineContext::commandLine())); QString userPrefStorePath = profileAdapter.dataPath(); @@ -92,12 +93,12 @@ void PrefServiceAdapter::setup(const ProfileAdapter &profileAdapter) factory.set_user_prefs(base::MakeRefCounted<JsonPrefStore>(toFilePath(userPrefStorePath))); } - PrefRegistrySimple *registry = new PrefRegistrySimple(); - PrefProxyConfigTrackerImpl::RegisterPrefs(registry); + auto registry = base::MakeRefCounted<PrefRegistrySimple>(); + PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); #if QT_CONFIG(webengine_spellchecker) // Initial spellcheck settings - registry->RegisterStringPref(prefs::kAcceptLanguages, std::string()); + registry->RegisterStringPref(language::prefs::kAcceptLanguages, std::string()); registry->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries); registry->RegisterListPref(spellcheck::prefs::kSpellCheckForcedDictionaries); registry->RegisterListPref(spellcheck::prefs::kSpellCheckBlacklistedDictionaries); diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp index 3d3baa0d7..748104312 100644 --- a/src/core/profile_qt.cpp +++ b/src/core/profile_qt.cpp @@ -41,7 +41,6 @@ #include "profile_adapter.h" #include "browsing_data_remover_delegate_qt.h" -#include "command_line_pref_store_qt.h" #include "download_manager_delegate_qt.h" #include "net/ssl_host_state_delegate_qt.h" #include "permission_manager_qt.h" diff --git a/src/core/qtwebengine_sources.gni b/src/core/qtwebengine_sources.gni index 9facb98f0..9c65fa690 100644 --- a/src/core/qtwebengine_sources.gni +++ b/src/core/qtwebengine_sources.gni @@ -51,6 +51,7 @@ source_set("qtwebengine_sources") { "//components/nacl/common:buildflags", "//components/plugins/renderer/", "//extensions/buildflags:buildflags", + "//rlz/buildflags:buildflags", "//third_party/blink/public/mojom:mojom_platform", ] @@ -64,6 +65,8 @@ source_set("qtwebengine_sources") { "//chrome/browser/media/webrtc/desktop_media_list.h", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.h", + "//chrome/browser/prefs/chrome_command_line_pref_store.cc", + "//chrome/browser/prefs/chrome_command_line_pref_store.h", "//chrome/browser/profiles/profile.cc", "//chrome/browser/profiles/profile.h", "//chrome/browser/ui/webui/devtools_ui.cc", diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index 756c10079..dffdcbc11 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -68,41 +68,29 @@ def isInChromiumBlacklist(file_path): or file_path.startswith('buildtools/third_party/libunwind') or (file_path.startswith('chrome/') and not file_path.startswith('chrome/VERSION') and + not file_path.startswith('chrome/app/resources/') and + not file_path.startswith('chrome/app/theme/') and not file_path.startswith('chrome/browser/chrome_notification_types.h') and - not '/app/theme/' in file_path and - not '/app/resources/' in file_path and - not '/browser/printing/' in file_path and - not ('/browser/resources/' in file_path and not '/chromeos/' in file_path) and - not '/renderer/resources/' in file_path and - not 'repack_locales' in file_path and - not 'third_party/chromevox' in file_path and - not 'media/webrtc/desktop_media_list.h' in file_path and - not 'media/webrtc/desktop_streams_registry.' in file_path and - not 'browser/net/chrome_mojo_proxy_resolver_factory.' in file_path and - not '/browser/accessibility/' in file_path and - not '/browser/custom_handlers/' in file_path and - not '/browser/devtools/' in file_path and - not '/browser/ui/webui/' in file_path and - not 'common/chrome_constants.' in file_path and - not 'common/chrome_paths' in file_path and - not 'common/chrome_switches.' in file_path and - not 'common/content_restriction.h' in file_path and - not 'common/custom_handlers/' in file_path and - not 'common/spellcheck_' in file_path and - not 'common/url_constants.' in file_path and - not 'common/webui_url_constants.' in file_path and - not '/extensions/api/' in file_path and - not '/extensions/browser/api/' in file_path and - not '/extensions/permissions/' in file_path and - not '/renderer_host/pepper/' in file_path and - not '/renderer/pepper/' in file_path and - not '/spellchecker/' in file_path and - not '/tools/convert_dict/' in file_path and - not file_path.endswith('cf_resources.rc') and - not file_path.endswith('version.py') and + not file_path.startswith('chrome/browser/accessibility/') and + not file_path.startswith('chrome/browser/custom_handlers/') and + not file_path.startswith('chrome/browser/devtools/') and + not file_path.startswith('chrome/browser/extensions/api/') and + not file_path.startswith('chrome/browser/media/webrtc/') and + not file_path.startswith('chrome/browser/net/') and + not file_path.startswith('chrome/browser/prefs/') and + not file_path.startswith('chrome/browser/printing/') and + not file_path.startswith('chrome/browser/renderer_host/') and + not file_path.startswith('chrome/browser/spellchecker') and + not file_path.startswith('chrome/browser/ui/webui/') and + not (file_path.startswith('chrome/browser/resources/') and + not '/chromeos/' in file_path and + not '/settings/' in file_path and + not '/mediarouter/' in file_path) and + not (file_path.startswith('chrome/common/') and not file_path.startswith('chrome/common/extensions/docs')) and + not file_path.startswith('chrome/renderer/') and + not file_path.startswith('chrome/tools/convert_dict/') and not file_path.endswith('.grd') and not file_path.endswith('.grdp') and - not file_path.endswith('.json') and not file_path.endswith('chrome_version.rc.version')) or file_path.startswith('chrome_elf') or file_path.startswith('chromecast') diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py index 4aec57051..58d5aa19d 100644 --- a/tools/scripts/version_resolver.py +++ b/tools/scripts/version_resolver.py @@ -38,7 +38,7 @@ import json import urllib2 import git_submodule as GitSubmodule -chromium_version = '79.0.3945.139' +chromium_version = '79.0.3945.147' chromium_branch = '3945' ninja_version = 'v1.8.2' |