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

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

Issue 796543002: Plugin Power Saver: Implement option in Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix one more test :( Created 6 years 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 abd690b4ed8f9ad1bbf6d8bd23486fe761c4f76c..065b2519c42894a0149589029597a794c19e482a 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.cc
+++ b/chrome/browser/plugins/plugin_info_message_filter.cc
@@ -415,9 +415,11 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
}
#endif // defined(ENABLE_EXTENSIONS)
- if (plugin_setting == CONTENT_SETTING_ASK) {
- status->value = ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay;
- } else if (plugin_setting == CONTENT_SETTING_BLOCK) {
+ if (plugin_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT) {
+ status->value =
+ ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent;
+ } else if (plugin_setting == CONTENT_SETTING_BLOCK ||
+ plugin_setting == CONTENT_SETTING_ASK) {
status->value =
is_managed ? ChromeViewHostMsg_GetPluginInfo_Status::kBlockedByPolicy
: ChromeViewHostMsg_GetPluginInfo_Status::kBlocked;
@@ -546,7 +548,8 @@ void PluginInfoMessageFilter::Context::MaybeGrantAccess(
const ChromeViewHostMsg_GetPluginInfo_Status& status,
const base::FilePath& path) const {
if (status.value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed ||
- status.value == ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay) {
+ status.value ==
+ ChromeViewHostMsg_GetPluginInfo_Status::kPlayImportantContent) {
ChromePluginServiceFilter::GetInstance()->AuthorizePlugin(
render_process_id_, path);
}

Powered by Google App Engine
This is Rietveld 408576698