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

Side by Side Diff: chrome/browser/views/options/content_filter_page_view.cc

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/options/content_filter_page_view.h" 5 #include "chrome/browser/views/options/content_filter_page_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
10 #include "chrome/browser/geolocation/geolocation_exceptions_table_model.h" 10 #include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 IDS_COOKIES_ASK_EVERY_TIME_RADIO, 94 IDS_COOKIES_ASK_EVERY_TIME_RADIO,
95 0, 95 0,
96 0, 96 0,
97 IDS_PLUGIN_ASK_RADIO, 97 IDS_PLUGIN_ASK_RADIO,
98 0, 98 0,
99 IDS_GEOLOCATION_ASK_RADIO, 99 IDS_GEOLOCATION_ASK_RADIO,
100 IDS_NOTIFICATIONS_ASK_RADIO, 100 IDS_NOTIFICATIONS_ASK_RADIO,
101 }; 101 };
102 COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES, 102 COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES,
103 Need_a_setting_for_every_content_settings_type); 103 Need_a_setting_for_every_content_settings_type);
104 DCHECK_EQ(arraysize(kAskIDs),
105 static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES));
106 if (content_type_ != CONTENT_SETTINGS_TYPE_COOKIES) { 104 if (content_type_ != CONTENT_SETTINGS_TYPE_COOKIES) {
107 if (kAskIDs[content_type_] != 0) { 105 int askID = kAskIDs[content_type_];
106 if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
107 !CommandLine::ForCurrentProcess()->HasSwitch(
108 switches::kEnableClickToPlay)) {
109 askID = 0;
110 }
111 if (askID != 0) {
108 ask_radio_ = new views::RadioButton( 112 ask_radio_ = new views::RadioButton(
109 l10n_util::GetString(kAskIDs[content_type_]), radio_button_group); 113 l10n_util::GetString(askID), radio_button_group);
110 ask_radio_->set_listener(this); 114 ask_radio_->set_listener(this);
111 ask_radio_->SetMultiLine(true); 115 ask_radio_->SetMultiLine(true);
112 layout->StartRow(0, single_column_set_id); 116 layout->StartRow(0, single_column_set_id);
113 layout->AddView(ask_radio_); 117 layout->AddView(ask_radio_);
114 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 118 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
115 } 119 }
116 } 120 }
117 121
118 static const int kBlockIDs[] = { 122 static const int kBlockIDs[] = {
119 IDS_COOKIES_BLOCK_RADIO, 123 IDS_COOKIES_BLOCK_RADIO,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 profile()->GetGeolocationContentSettingsMap()->SetDefaultContentSetting( 222 profile()->GetGeolocationContentSettingsMap()->SetDefaultContentSetting(
219 default_setting); 223 default_setting);
220 } else if (content_type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { 224 } else if (content_type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
221 profile()->GetDesktopNotificationService()->SetDefaultContentSetting( 225 profile()->GetDesktopNotificationService()->SetDefaultContentSetting(
222 default_setting); 226 default_setting);
223 } else { 227 } else {
224 profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( 228 profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
225 content_type_, default_setting); 229 content_type_, default_setting);
226 } 230 }
227 } 231 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698