diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 31159b328..b6be3bc75 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/52.0.2743.24', + 'chromium_checkout': 'refs/tags/52.0.2743.41', } diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index e4d429f37..f967dd26e 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -27,6 +27,7 @@ #include "build/build_config.h" #include "chrome/browser/net/proxy_service_factory.h" #include "chrome/common/pref_names.h" +#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_client.h" @@ -120,9 +121,18 @@ CefURLRequestContextGetterImpl::CefURLRequestContextGetterImpl( std::swap(protocol_handlers_, *protocol_handlers); + auto io_thread_proxy = + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); + + quick_check_enabled_.Init(prefs::kQuickCheckEnabled, pref_service); + quick_check_enabled_.MoveToThread(io_thread_proxy); + + pac_https_url_stripping_enabled_.Init(prefs::kPacHttpsUrlStrippingEnabled, + pref_service); + pac_https_url_stripping_enabled_.MoveToThread(io_thread_proxy); + force_google_safesearch_.Init(prefs::kForceGoogleSafeSearch, pref_service); - force_google_safesearch_.MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); + force_google_safesearch_.MoveToThread(io_thread_proxy); #if defined(OS_POSIX) && !defined(OS_ANDROID) gsapi_library_name_ = pref_service->GetString(prefs::kGSSAPILibraryName); @@ -138,8 +148,24 @@ CefURLRequestContextGetterImpl::~CefURLRequestContextGetterImpl() { storage_->set_proxy_service(NULL); } +// static +void CefURLRequestContextGetterImpl::RegisterPrefs( + PrefRegistrySimple* registry) { + // Based on IOThread::RegisterPrefs. +#if defined(OS_POSIX) && !defined(OS_ANDROID) + registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string()); +#endif + registry->RegisterBooleanPref(prefs::kQuickCheckEnabled, true); + registry->RegisterBooleanPref(prefs::kPacHttpsUrlStrippingEnabled, true); + + // Based on ProfileImpl::RegisterProfilePrefs. + registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false); +} + void CefURLRequestContextGetterImpl::ShutdownOnUIThread() { CEF_REQUIRE_UIT(); + quick_check_enabled_.Destroy(); + pac_https_url_stripping_enabled_.Destroy(); force_google_safesearch_.Destroy(); } @@ -189,7 +215,8 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { url_request_context_->network_delegate(), std::move(proxy_config_service_), *command_line, - true); + quick_check_enabled_.GetValue(), + pac_https_url_stripping_enabled_.GetValue()); storage_->set_proxy_service(std::move(system_proxy_service)); storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults); diff --git a/libcef/browser/net/url_request_context_getter_impl.h b/libcef/browser/net/url_request_context_getter_impl.h index 9645da358..a009070f3 100644 --- a/libcef/browser/net/url_request_context_getter_impl.h +++ b/libcef/browser/net/url_request_context_getter_impl.h @@ -21,6 +21,7 @@ #include "content/public/browser/browser_context.h" #include "net/url_request/url_request_job_factory.h" +class PrefRegistrySimple; class PrefService; namespace base { @@ -53,6 +54,9 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter { content::URLRequestInterceptorScopedVector request_interceptors); ~CefURLRequestContextGetterImpl() override; + // Register preferences. Called from browser_prefs::CreatePrefService(). + static void RegisterPrefs(PrefRegistrySimple* registry); + // Called when the BrowserContextImpl is destroyed. void ShutdownOnUIThread(); @@ -106,6 +110,9 @@ class CefURLRequestContextGetterImpl : public CefURLRequestContextGetter { std::vector > handler_list_; + BooleanPrefMember quick_check_enabled_; + BooleanPrefMember pac_https_url_stripping_enabled_; + // Member variables which are pointed to by the various context objects. mutable BooleanPrefMember force_google_safesearch_; diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index 88d55437c..5d1e502c7 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -5,6 +5,7 @@ #include "libcef/browser/prefs/browser_prefs.h" #include "libcef/browser/media_capture_devices_dispatcher.h" +#include "libcef/browser/net/url_request_context_getter_impl.h" #include "libcef/browser/prefs/renderer_prefs.h" #include "libcef/common/cef_switches.h" @@ -126,6 +127,7 @@ std::unique_ptr CreatePrefService(const base::FilePath& pref_path) PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); extensions::ExtensionPrefs::RegisterProfilePrefs(registry.get()); HostContentSettingsMap::RegisterProfilePrefs(registry.get()); + CefURLRequestContextGetterImpl::RegisterPrefs(registry.get()); renderer_prefs::RegisterProfilePrefs(registry.get()); update_client::RegisterPrefs(registry.get()); @@ -160,14 +162,6 @@ std::unique_ptr CreatePrefService(const base::FilePath& pref_path) registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false); - // Network preferences. - // Based on ProfileImpl::RegisterProfilePrefs. - registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false); - // Based on IOThread::RegisterPrefs. -#if defined(OS_POSIX) && !defined(OS_ANDROID) - registry->RegisterStringPref(prefs::kGSSAPILibraryName, std::string()); -#endif - if (command_line->HasSwitch(switches::kEnablePreferenceTesting)) { // Preferences used with unit tests. registry->RegisterBooleanPref("test.bool", true); diff --git a/patch/patches/browser_frame_host_guest_1687.patch b/patch/patches/browser_frame_host_guest_1687.patch index 8b3120d1f..6b8f5db0c 100644 --- a/patch/patches/browser_frame_host_guest_1687.patch +++ b/patch/patches/browser_frame_host_guest_1687.patch @@ -1,8 +1,8 @@ diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc -index 5ddb600..b1860b0 100644 +index 2f7ff29..49389ce 100644 --- render_widget_host_view_guest.cc +++ render_widget_host_view_guest.cc -@@ -212,6 +212,9 @@ void RenderWidgetHostViewGuest::Destroy() { +@@ -215,6 +215,9 @@ void RenderWidgetHostViewGuest::Destroy() { } gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { diff --git a/patch/patches/build.patch b/patch/patches/build.patch index afbc27864..4eab67ac4 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git common.gypi common.gypi -index 296b90b..e258f15 100644 +index 2850490..a00882f 100644 --- common.gypi +++ common.gypi @@ -9,6 +9,9 @@ diff --git a/patch/patches/content_nav_1129.patch b/patch/patches/content_nav_1129.patch index 2f757ead4..1bfd67af2 100644 --- a/patch/patches/content_nav_1129.patch +++ b/patch/patches/content_nav_1129.patch @@ -39,10 +39,10 @@ index d96adc9..348ae16 100644 // built in media player for the given |url|. Defaults to false. virtual bool ShouldUseMediaPlayerForURL(const GURL& url); diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc -index 289ca31..a1ee333 100644 +index ad69005..af19ad5 100644 --- renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc -@@ -4751,7 +4751,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( +@@ -4753,7 +4753,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( (pending_navigation_params_ && !pending_navigation_params_->request_params.redirects.empty()); @@ -50,7 +50,7 @@ index 289ca31..a1ee333 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (GetContentClient()->renderer()->HandleNavigation( -@@ -4760,7 +4759,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( +@@ -4762,7 +4761,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( is_redirect)) { return blink::WebNavigationPolicyIgnore; } diff --git a/patch/patches/views_widget_180_1481_1677_1749.patch b/patch/patches/views_widget_180_1481_1677_1749.patch index 34ccd6da1..2ba7934fc 100644 --- a/patch/patches/views_widget_180_1481_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1677_1749.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 9d63bbd..31520f1 100644 +index 4bb17af87..3143357 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -685,6 +685,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {