Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: chrome/browser/plugins/plugin_info_message_filter.cc

Issue 1857263004: Always trust internal PDF viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/plugins/plugin_info_message_filter.cc
diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc
index caed15b3a900a9c1b7d07be32f9c35a7d18cd07b..56d24fb88f20a348cd53dc7ee1a3dbd62d6cd94f 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -355,6 +355,14 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
#endif
}
+ PluginMetadata::SecurityStatus plugin_status =
+ plugin_metadata->GetSecurityStatus(plugin);
+
+ if (plugin_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
+ *status = ChromeViewHostMsg_GetPluginInfo_Status::kAllowed;
+ return;
+ }
+
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
bool uses_default_content_setting = true;
bool is_managed = false;
@@ -372,8 +380,6 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
DCHECK(plugin_setting != CONTENT_SETTING_ASK);
- PluginMetadata::SecurityStatus plugin_status =
- plugin_metadata->GetSecurityStatus(plugin);
#if defined(ENABLE_PLUGIN_INSTALLATION)
// Check if the plugin is outdated.
if (plugin_status == PluginMetadata::SECURITY_STATUS_OUT_OF_DATE &&
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_metadata.h » ('j') | chrome/browser/resources/plugin_metadata/plugins_mac.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698