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

Unified Diff: chrome/browser/content_setting_combo_model.cc

Issue 4643007: Move click-to-play to about:flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 10 years, 1 month 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/content_setting_combo_model.cc
diff --git a/chrome/browser/content_setting_combo_model.cc b/chrome/browser/content_setting_combo_model.cc
index ec39a13f268f6c783f9b44e7fd49a4d4e93d2dc8..36065875961a517c9e681e2fee9c3186b1c88ea6 100644
--- a/chrome/browser/content_setting_combo_model.cc
+++ b/chrome/browser/content_setting_combo_model.cc
@@ -36,7 +36,8 @@ ContentSettingComboModel::~ContentSettingComboModel() {
}
int ContentSettingComboModel::GetItemCount() {
- if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS)
+ if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableClickToPlay))
return arraysize(kAskSettings);
if (content_type_ == CONTENT_SETTINGS_TYPE_COOKIES)
return arraysize(kSessionSettings);
@@ -60,7 +61,8 @@ string16 ContentSettingComboModel::GetItemAt(int index) {
}
ContentSetting ContentSettingComboModel::SettingForIndex(int index) {
- if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS)
+ if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableClickToPlay))
return kAskSettings[index];
if (content_type_ == CONTENT_SETTINGS_TYPE_COOKIES)
return kSessionSettings[index];

Powered by Google App Engine
This is Rietveld 408576698