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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 1230953005: Allow "Run all plugins this time" if managed setting is click to play. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // whitelist. 377 // whitelist.
378 radio_group.default_item = 1; 378 radio_group.default_item = 1;
379 } else if (setting == CONTENT_SETTING_ALLOW) { 379 } else if (setting == CONTENT_SETTING_ALLOW) {
380 radio_group.default_item = kAllowButtonIndex; 380 radio_group.default_item = kAllowButtonIndex;
381 // |block_setting_| is already set to |CONTENT_SETTING_BLOCK|. 381 // |block_setting_| is already set to |CONTENT_SETTING_BLOCK|.
382 } else { 382 } else {
383 radio_group.default_item = 1; 383 radio_group.default_item = 1;
384 block_setting_ = setting; 384 block_setting_ = setting;
385 } 385 }
386 386
387 set_setting_is_managed(setting_source != SETTING_SOURCE_USER); 387 set_setting_is_managed(setting_source != SETTING_SOURCE_USER &&
388 setting != CONTENT_SETTING_ASK);
388 if (setting_source != SETTING_SOURCE_USER) { 389 if (setting_source != SETTING_SOURCE_USER) {
389 set_radio_group_enabled(false); 390 set_radio_group_enabled(false);
390 } else { 391 } else {
391 set_radio_group_enabled(true); 392 set_radio_group_enabled(true);
392 } 393 }
393 selected_item_ = radio_group.default_item; 394 selected_item_ = radio_group.default_item;
394 set_radio_group(radio_group); 395 set_radio_group(radio_group);
395 } 396 }
396 397
397 void ContentSettingSingleRadioGroup::AddException(ContentSetting setting) { 398 void ContentSettingSingleRadioGroup::AddException(ContentSetting setting) {
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { 1298 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) {
1298 DCHECK_EQ(web_contents_, 1299 DCHECK_EQ(web_contents_,
1299 content::Source<WebContents>(source).ptr()); 1300 content::Source<WebContents>(source).ptr());
1300 web_contents_ = NULL; 1301 web_contents_ = NULL;
1301 } else { 1302 } else {
1302 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); 1303 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
1303 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); 1304 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr());
1304 profile_ = NULL; 1305 profile_ = NULL;
1305 } 1306 }
1306 } 1307 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698