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

Unified Diff: chrome/browser/ui/views/options/content_filter_page_view.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/ui/views/options/content_filter_page_view.cc
diff --git a/chrome/browser/ui/views/options/content_filter_page_view.cc b/chrome/browser/ui/views/options/content_filter_page_view.cc
index 756045f7fbb1adb01cd03ffed6072988e4bc6100..6b0c22044f7ee1fea34af367daa02928b1d32cb6 100644
--- a/chrome/browser/ui/views/options/content_filter_page_view.cc
+++ b/chrome/browser/ui/views/options/content_filter_page_view.cc
@@ -101,12 +101,16 @@ void ContentFilterPageView::InitControlLayout() {
};
COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
- DCHECK_EQ(arraysize(kAskIDs),
- static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES));
if (content_type_ != CONTENT_SETTINGS_TYPE_COOKIES) {
- if (kAskIDs[content_type_] != 0) {
+ int askID = kAskIDs[content_type_];
+ if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableClickToPlay)) {
+ askID = 0;
+ }
+ if (askID != 0) {
ask_radio_ = new views::RadioButton(
- l10n_util::GetString(kAskIDs[content_type_]), radio_button_group);
+ l10n_util::GetString(askID), radio_button_group);
ask_radio_->set_listener(this);
ask_radio_->SetMultiLine(true);
layout->StartRow(0, single_column_set_id);

Powered by Google App Engine
This is Rietveld 408576698