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

Unified Diff: chrome/browser/ui/webui/plugins/plugins_handler.cc

Issue 1857263004: Always trust internal PDF viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase rebase 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
« no previous file with comments | « chrome/browser/ui/webui/plugins/plugins.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/plugins/plugins_handler.cc
diff --git a/chrome/browser/ui/webui/plugins/plugins_handler.cc b/chrome/browser/ui/webui/plugins/plugins_handler.cc
index a37e602f9e48e752c6e64ce0cfad32fe8dd5b099..112b1a74c97bb5862e593faed6b1c02e3835442f 100644
--- a/chrome/browser/ui/webui/plugins/plugins_handler.cc
+++ b/chrome/browser/ui/webui/plugins/plugins_handler.cc
@@ -258,11 +258,19 @@ mojo::Array<mojom::PluginDataPtr> PluginsHandler::GeneratePluginsData(
GetPluginGroupEnabledMode(plugin_files, group_enabled));
plugin_data->always_allowed = false;
+ plugin_data->trusted = false;
+
if (group_enabled) {
- const base::DictionaryValue* whitelist =
- profile->GetPrefs()->GetDictionary(
- prefs::kContentSettingsPluginWhitelist);
- whitelist->GetBoolean(group_identifier, &plugin_data->always_allowed);
+ if (plugin_metadata->GetSecurityStatus(*active_plugin) ==
+ PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
+ plugin_data->trusted = true;
+ plugin_data->always_allowed = true;
+ } else {
+ const base::DictionaryValue* whitelist =
+ profile->GetPrefs()->GetDictionary(
+ prefs::kContentSettingsPluginWhitelist);
+ whitelist->GetBoolean(group_identifier, &plugin_data->always_allowed);
+ }
}
plugin_data->critical = false;
« no previous file with comments | « chrome/browser/ui/webui/plugins/plugins.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698