Commit 28d24e22 authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Update to Chromium version 72.0.3626.0 (#612437)

- Windows: Can now build with either 10.0.17134 or 10.0.17763 SDK.
parent 6df612a5
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/72.0.3615.0',
'chromium_checkout': 'refs/tags/72.0.3626.0',
}
......@@ -472,7 +472,6 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
url_request_getter_ = new CefURLRequestContextGetterImpl(
settings_, GetPrefs(), io_thread_runner, protocol_handlers,
std::move(proxy_config_service), std::move(request_interceptors));
resource_context()->set_url_request_context_getter(url_request_getter_.get());
return url_request_getter_.get();
}
......
......@@ -233,8 +233,6 @@ CefBrowserContextProxy::GetOrCreateStoragePartitionProxy(
scoped_refptr<CefURLRequestContextGetterProxy> url_request_getter =
new CefURLRequestContextGetterProxy(handler_,
parent_->request_context_getter());
resource_context()->set_url_request_context_getter(
url_request_getter.get());
storage_partition_proxy_.reset(
new CefStoragePartitionProxy(partition_impl, url_request_getter.get()));
......
......@@ -73,10 +73,10 @@ PrefService* ChromeProfileStub::GetOffTheRecordPrefs() {
base::OnceCallback<net::CookieStore*()>
ChromeProfileStub::GetExtensionsCookieStoreGetter() {
return base::BindOnce(
[](content::ResourceContext* context) {
return context->GetRequestContext()->cookie_store();
[](scoped_refptr<net::URLRequestContextGetter> context) {
return context->GetURLRequestContext()->cookie_store();
},
GetResourceContext());
base::WrapRefCounted(GetRequestContext()));
}
bool ChromeProfileStub::IsSameProfile(Profile* profile) {
......
......@@ -734,7 +734,8 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
// Propagate the following switches to the zygote command line (along with
// any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
switches::kPpapiFlashPath, switches::kPpapiFlashVersion,
switches::kPpapiFlashPath,
switches::kPpapiFlashVersion,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
......@@ -1095,9 +1096,11 @@ void CefContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
bool CefContentBrowserClient::WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
int render_process_id,
bool is_navigation,
const url::Origin& request_initiator,
network::mojom::URLLoaderFactoryRequest* factory_request,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
bool* bypass_redirect_checks) {
if (!extensions::ExtensionsEnabled())
return false;
......@@ -1106,7 +1109,8 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
browser_context);
bool use_proxy = web_request_api->MaybeProxyURLLoaderFactory(
frame, is_navigation, factory_request);
browser_context, frame, render_process_id, is_navigation, factory_request,
header_client);
if (bypass_redirect_checks)
*bypass_redirect_checks = use_proxy;
return use_proxy;
......
......@@ -143,9 +143,11 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
bool WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
int render_process_id,
bool is_navigation,
const url::Origin& request_initiator,
network::mojom::URLLoaderFactoryRequest* factory_request,
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
bool* bypass_redirect_checks) override;
bool HandleExternalProtocol(
......
......@@ -150,12 +150,12 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
return view_->GetDeviceScaleFactor();
}
void AllocateNewSurfaceIdOnEviction() override {}
std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() override {
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
}
void InvalidateLocalSurfaceIdOnEviction() override {}
private:
CefRenderWidgetHostViewOSR* const view_;
......
......@@ -66,11 +66,6 @@ void CefResourceContext::RemoveUserData(const void* key) {
content::ResourceContext::RemoveUserData(key);
}
net::URLRequestContext* CefResourceContext::GetRequestContext() {
CHECK(getter_.get());
return getter_->GetURLRequestContext();
}
std::unique_ptr<net::ClientCertStore>
CefResourceContext::CreateClientCertStore() {
#if defined(USE_NSS_CERTS)
......@@ -96,12 +91,6 @@ void CefResourceContext::set_extensions_info_map(
extension_info_map_ = extensions_info_map;
}
void CefResourceContext::set_url_request_context_getter(
CefURLRequestContextGetter* getter) {
DCHECK(!getter_.get());
getter_ = getter;
}
void CefResourceContext::set_parent(CefResourceContext* parent) {
DCHECK(!parent_);
DCHECK(parent);
......
......@@ -37,13 +37,9 @@ class CefResourceContext : public content::ResourceContext {
void SetUserData(const void* key, std::unique_ptr<Data> data) override;
void RemoveUserData(const void* key) override;
// ResourceContext implementation.
net::URLRequestContext* GetRequestContext() override;
std::unique_ptr<net::ClientCertStore> CreateClientCertStore();
void set_extensions_info_map(extensions::InfoMap* extensions_info_map);
void set_url_request_context_getter(CefURLRequestContextGetter* getter);
void set_parent(CefResourceContext* parent);
// Remember the plugin load decision for plugin status requests that arrive
......@@ -71,8 +67,6 @@ class CefResourceContext : public content::ResourceContext {
CefRefPtr<CefRequestContextHandler> GetHandler() const { return handler_; }
private:
scoped_refptr<CefURLRequestContextGetter> getter_;
// Non-NULL when this object is owned by a CefBrowserContextProxy. |parent_|
// is guaranteed to outlive this object because CefBrowserContextProxy has a
// refptr to the CefBrowserContextImpl that owns |parent_|.
......
......@@ -11,11 +11,6 @@
#include "ipc/struct_constructor_macros.h"
#include "libcef/common/cef_message_generator.h"
// Generate destructors.
#include "chrome/common/safe_browsing/ipc_protobuf_message_null_macros.h"
#include "ipc/struct_destructor_macros.h"
#include "libcef/common/cef_message_generator.h"
// Generate param traits write methods.
#include "chrome/common/safe_browsing/protobuf_message_write_macros.h"
#include "ipc/param_traits_write_macros.h"
......
......@@ -23,6 +23,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/renderer/document_state.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "content/renderer/navigation_state.h"
#include "third_party/blink/public/platform/web_string.h"
......@@ -625,7 +626,9 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
params.arguments.GetString(0, &string);
params.arguments.GetString(1, &url);
web_frame->LoadHTMLString(string, GURL(url));
content::RenderFrame::FromWebFrame(web_frame)->LoadHTMLString(
string, GURL(url), "UTF-8", GURL(),
false /* replace_current_item */);
}
}
} else {
......
......@@ -27,6 +27,7 @@
#include "libcef/renderer/thread_util.h"
#include "libcef/renderer/v8_impl.h"
#include "content/public/renderer/render_frame.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
......@@ -35,6 +36,7 @@
#include "third_party/blink/public/web/web_document_loader.h"
#include "third_party/blink/public/web/web_frame_content_dumper.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_navigation_control.h"
#include "third_party/blink/public/web/web_script_source.h"
#include "third_party/blink/public/web/web_view.h"
......@@ -152,7 +154,9 @@ void CefFrameImpl::LoadString(const CefString& string, const CefString& url) {
if (frame_) {
GURL gurl = GURL(url.ToString());
frame_->LoadHTMLString(string.ToString(), gurl);
content::RenderFrame::FromWebFrame(frame_)->LoadHTMLString(
string.ToString(), gurl, "UTF-8", GURL(),
false /* replace_current_item */);
}
}
......
......@@ -1330,7 +1330,12 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
tmpl->SetIndexedPropertyHandler(InterceptorGetterCallbackImpl<uint32_t>,
InterceptorSetterCallbackImpl<uint32_t>);
obj = tmpl->NewInstance();
v8::MaybeLocal<v8::Object> maybe_object = tmpl->NewInstance(context);
if (!maybe_object.ToLocal<v8::Object>(&obj)) {
NOTREACHED() << "Failed to create V8 Object with interceptor";
return NULL;
}
} else {
obj = v8::Object::New(isolate);
}
......@@ -1435,8 +1440,9 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
v8::FunctionTemplate::New(isolate, FunctionCallbackImpl, function_data);
// Retrieve the function object and set the name.
v8::Local<v8::Function> func = tmpl->GetFunction();
if (func.IsEmpty()) {
v8::MaybeLocal<v8::Function> maybe_func = tmpl->GetFunction(context);
v8::Local<v8::Function> func;
if (!maybe_func.ToLocal(&func)) {
NOTREACHED() << "failed to create V8 function";
return NULL;
}
......
......@@ -60,11 +60,6 @@ bool CefContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
}
void CefContentUtilityClient::RegisterServices(StaticServiceMap* services) {
service_manager::EmbeddedServiceInfo pdf_compositor_info;
pdf_compositor_info.factory =
base::Bind(&printing::CreatePdfCompositorService, std::string());
services->emplace(printing::mojom::kServiceName, pdf_compositor_info);
{
service_manager::EmbeddedServiceInfo printing_info;
printing_info.factory =
......@@ -81,3 +76,14 @@ void CefContentUtilityClient::RegisterServices(StaticServiceMap* services) {
services->emplace(proxy_resolver::mojom::kProxyResolverServiceName,
proxy_resolver_info);
}
std::unique_ptr<service_manager::Service>
CefContentUtilityClient::HandleServiceRequest(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) {
if (service_name == printing::mojom::kServiceName) {
return printing::CreatePdfCompositorService(std::string(),
std::move(request));
}
return nullptr;
}
......@@ -25,6 +25,9 @@ class CefContentUtilityClient : public content::ContentUtilityClient {
void UtilityThreadStarted() override;
bool OnMessageReceived(const IPC::Message& message) override;
void RegisterServices(StaticServiceMap* services) override;
std::unique_ptr<service_manager::Service> HandleServiceRequest(
const std::string& service_name,
service_manager::mojom::ServiceRequest request) override;
private:
#if defined(OS_WIN)
......
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index e271d4bc6c31..6e3c5c2b8f73 100644
index da7e3391774e..7ac32ff70a5a 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
......@@ -12,7 +12,7 @@ index e271d4bc6c31..6e3c5c2b8f73 100644
// Force a new surface id to be allocated. Returns true if the
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 0240d7338201..840693c7cd4a 100644
index 21d3b34cc13f..0e281eaf06d9 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
......
......@@ -37,7 +37,7 @@ index e706efbc6219..3b6f60660650 100644
attached_ = true;
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
index babcf10c37d0..b0261ed77ef0 100644
index a97648ef717b..b82895c89f77 100644
--- content/browser/frame_host/interstitial_page_impl.cc
+++ content/browser/frame_host/interstitial_page_impl.cc
@@ -632,7 +632,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
......@@ -221,10 +221,10 @@ index 5317a1895671..770d05a9c4a9 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
index ed6586cff68c..731a51629a2c 100644
index 18f85330beaf..bf220383e368 100644
--- content/browser/web_contents/web_contents_view_mac.mm
+++ content/browser/web_contents/web_contents_view_mac.mm
@@ -336,7 +336,8 @@ void WebContentsViewMac::CreateView(
@@ -337,7 +337,8 @@ void WebContentsViewMac::CreateView(
}
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
......@@ -234,7 +234,7 @@ index ed6586cff68c..731a51629a2c 100644
if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that
@@ -348,6 +349,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
@@ -349,6 +350,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
render_widget_host->GetView());
}
......
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index f6b909554223..f454ed9b8a84 100644
index e0fd47a70c7b..d56e7a6b8bec 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
......@@ -10,7 +10,7 @@ index f6b909554223..f454ed9b8a84 100644
import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni")
@@ -1716,6 +1717,7 @@ jumbo_split_static_library("browser") {
@@ -1725,6 +1726,7 @@ jumbo_split_static_library("browser") {
"//base:i18n",
"//base/allocator:buildflags",
"//cc",
......@@ -18,7 +18,7 @@ index f6b909554223..f454ed9b8a84 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1994,6 +1996,10 @@ jumbo_split_static_library("browser") {
@@ -2004,6 +2006,10 @@ jumbo_split_static_library("browser") {
]
}
......@@ -29,7 +29,7 @@ index f6b909554223..f454ed9b8a84 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -3599,7 +3605,7 @@ jumbo_split_static_library("browser") {
@@ -3629,7 +3635,7 @@ jumbo_split_static_library("browser") {
]
}
......
......@@ -24,10 +24,10 @@ index cac72c6a2fd1..2ed83a4af1b3 100644
// network quality change events.
virtual network::NetworkQualityTracker* network_quality_tracker() = 0;
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 529239220bcc..fc9cdcd330c2 100644
index 9178909e6ce3..7656cbbb99c0 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -660,6 +660,10 @@ BrowserProcessImpl::system_network_context_manager() {
@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() {
return SystemNetworkContextManager::GetInstance();
}
......@@ -39,10 +39,10 @@ index 529239220bcc..fc9cdcd330c2 100644
BrowserProcessImpl::shared_url_loader_factory() {
return system_network_context_manager()->GetSharedURLLoaderFactory();
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 8cd716593b19..28f8a70167af 100644
index 143e7442ca05..896829d2836f 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -139,6 +139,7 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -140,6 +140,7 @@ class BrowserProcessImpl : public BrowserProcess,
// TODO(qinmin): Remove this method as callers can retrieve the global
// instance from SystemNetworkContextManager directly.
SystemNetworkContextManager* system_network_context_manager() override;
......
......@@ -71,10 +71,10 @@ index e8e76ce5b954..1dd338dd0142 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index cc62bbe4cf18..127cf4c982d6 100644
index e00b581b90d3..1ffa2e8f18da 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -380,7 +380,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -381,7 +381,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment