Update to Chromium version 78.0.3904.0 (#693954)

This commit is contained in:
Marshall Greenblatt
2019-10-01 13:55:16 +00:00
parent c8b457da38
commit f8e0797773
151 changed files with 1485 additions and 2238 deletions

View File

@ -1,10 +1,10 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index f2223e24ec7c..8374b7f0d56d 100644
index 865ca9288de7..8f736f081b86 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
#include "base/task_runner_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/browser_process.h"
@ -32,38 +32,42 @@ index f2223e24ec7c..8374b7f0d56d 100644
extensions::WebViewRendererState* renderer_state =
extensions::WebViewRendererState::GetInstance();
std::string partition_id;
@@ -130,12 +139,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -129,9 +138,6 @@ bool IsPluginLoadingAccessibleResourceInWebView(
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
: render_process_id_(render_process_id),
resource_context_(profile->GetResourceContext()),
-#if BUILDFLAG(ENABLE_EXTENSIONS)
- extension_registry_(extensions::ExtensionRegistry::Get(profile)),
-#endif
host_content_settings_map_(
HostContentSettingsMapFactory::GetForProfile(profile)),
plugin_prefs_(PluginPrefs::GetForProfile(profile)) {
@@ -139,6 +145,13 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
profile->GetPrefs());
run_all_flash_in_allow_mode_.Init(prefs::kRunAllFlashInAllowMode,
profile->GetPrefs());
+
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF)
+ if (extensions::ExtensionsEnabled())
+#endif
+ extension_registry_ = extensions::ExtensionRegistry::Get(profile);
+#endif
+
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
profile->GetPrefs());
allow_outdated_plugins_.MoveToSequence(
@@ -234,6 +247,7 @@ void PluginInfoHostImpl::PluginsLoaded(
}
PluginInfoHostImpl::Context::~Context() {}
@@ -209,6 +222,7 @@ void PluginInfoHostImpl::PluginsLoaded(
plugin_metadata->identifier(), &output->status);
}
+#if !BUILDFLAG(ENABLE_CEF)
if (output->status == chrome::mojom::PluginStatus::kNotFound) {
// Check to see if the component updater can fetch an implementation.
base::PostTaskAndReplyWithResult(
@@ -245,7 +259,9 @@ void PluginInfoHostImpl::PluginsLoaded(
base::BindOnce(&PluginInfoHostImpl::ComponentPluginLookupDone, this,
params, std::move(output), std::move(callback),
std::move(plugin_metadata)));
std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info =
@@ -217,7 +231,9 @@ void PluginInfoHostImpl::PluginsLoaded(
ComponentPluginLookupDone(params, std::move(output), std::move(callback),
std::move(plugin_metadata),
std::move(cus_plugin_info));
- } else {
+ } else
+#endif // !BUILDFLAG(ENABLE_CEF)
@ -71,7 +75,7 @@ index f2223e24ec7c..8374b7f0d56d 100644
GetPluginInfoFinish(params, std::move(output), std::move(callback),
std::move(plugin_metadata));
}
@@ -258,6 +274,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
@@ -230,6 +246,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus security_status,
const std::string& plugin_identifier,
chrome::mojom::PluginStatus* status) const {
@ -86,7 +90,7 @@ index f2223e24ec7c..8374b7f0d56d 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -366,16 +390,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -338,16 +362,35 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@ -101,9 +105,8 @@ index f2223e24ec7c..8374b7f0d56d 100644
+ size_t i = 0;
+ for (; i < matching_plugins.size(); ++i) {
+ if (filter->IsPluginAvailable(render_process_id_, render_frame_id,
+ resource_context_, url, is_main_frame,
+ main_frame_origin, &matching_plugins[i],
+ status)) {
+ url, is_main_frame, main_frame_origin,
+ &matching_plugins[i], status)) {
+ break;
+ }
+ }
@ -112,11 +115,11 @@ index f2223e24ec7c..8374b7f0d56d 100644
PluginService::GetInstance()->GetFilter();
size_t i = 0;
for (; i < matching_plugins.size(); ++i) {
if (!filter || filter->IsPluginAvailable(
render_process_id_, render_frame_id, resource_context_,
- url, main_frame_origin, &matching_plugins[i])) {
+ url, is_main_frame, main_frame_origin,
+ &matching_plugins[i])) {
if (!filter ||
filter->IsPluginAvailable(render_process_id_, render_frame_id, url,
- main_frame_origin, &matching_plugins[i])) {
+ is_main_frame, main_frame_origin,
+ &matching_plugins[i])) {
break;
}
}
@ -125,7 +128,7 @@ index f2223e24ec7c..8374b7f0d56d 100644
// If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size();
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
index 73d60aa7f77c..89bff0de7186 100644
index 56f147d2fc56..90553ec27d23 100644
--- chrome/browser/plugins/plugin_utils.cc
+++ chrome/browser/plugins/plugin_utils.cc
@@ -5,6 +5,7 @@
@ -148,40 +151,8 @@ index 73d60aa7f77c..89bff0de7186 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
@@ -251,12 +257,29 @@ base::flat_map<std::string, std::string>
PluginUtils::GetMimeTypeToExtensionIdMap(
content::ResourceContext* resource_context) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
+
+#if BUILDFLAG(ENABLE_CEF)
+ if (!extensions::ExtensionsEnabled())
+ return {};
+
+ CefResourceContext* context =
+ static_cast<CefResourceContext*>(resource_context);
+ bool profile_is_off_the_record = context->IsOffTheRecord();
+ scoped_refptr<extensions::InfoMap> extension_info_map(
+ const_cast<extensions::InfoMap*>(context->GetExtensionInfoMap()));
+ bool always_open_pdf_externally = !extensions::PdfExtensionEnabled();
+#else
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
scoped_refptr<extensions::InfoMap> extension_info_map(
io_data->GetExtensionInfoMap());
+ bool profile_is_off_the_record = io_data->IsOffTheRecord();
+ bool always_open_pdf_externally =
+ io_data->always_open_pdf_externally()->GetValue();
+#endif
+
return GetMimeTypeToExtensionIdMapInternal(
- io_data->IsOffTheRecord(),
- io_data->always_open_pdf_externally()->GetValue(),
+ profile_is_off_the_record,
+ always_open_pdf_externally,
base::BindRepeating(
[](const scoped_refptr<extensions::InfoMap>& info_map,
const std::string& extension_id) {
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index ae7e07340ea4..f193040e8bca 100644
index 03781c0b08e0..37dc3e93c7d9 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -794,6 +794,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(