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

Unified Diff: chrome/browser/cocoa/content_settings_dialog_controller.mm

Issue 3299020: Remove vestigial cookie/web app permissions prompting UI now that the async U... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/content_settings_dialog_controller.mm
===================================================================
--- chrome/browser/cocoa/content_settings_dialog_controller.mm (revision 59533)
+++ chrome/browser/cocoa/content_settings_dialog_controller.mm (working copy)
@@ -126,8 +126,6 @@
- (id)initWithProfile:(Profile*)profile {
DCHECK(profile);
- disableCookiePrompt_ = !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableCookiePrompt);
NSString* nibpath =
[mac_util::MainAppBundle() pathForResource:@"ContentSettings"
ofType:@"nib"];
@@ -182,9 +180,6 @@
DCHECK(tabViewPicker_);
DCHECK_EQ(self, [[self window] delegate]);
- [tabView_ removeTabViewItem:[tabView_
- tabViewItemAtIndex:disableCookiePrompt_ ? 0 : 1]];
-
// Adapt views to potentially long localized strings.
CGFloat windowDelta = 0;
for (NSTabViewItem* tab in [tabView_ tabViewItems]) {
@@ -243,13 +238,8 @@
- (void)setCookieSettingIndex:(NSInteger)value {
ContentSetting setting = CONTENT_SETTING_DEFAULT;
- // If the cookie prompt is disabled, the radio button for "block" is at the
- // position of the "ask" radio in the old dialog.
- if (disableCookiePrompt_ && value == kCookieAskIndex)
- value = kCookieDisabledIndex;
switch (value) {
case kCookieEnabledIndex: setting = CONTENT_SETTING_ALLOW; break;
- case kCookieAskIndex: setting = CONTENT_SETTING_ASK; break;
case kCookieDisabledIndex: setting = CONTENT_SETTING_BLOCK; break;
default:
NOTREACHED();
@@ -265,12 +255,7 @@
switch (profile_->GetHostContentSettingsMap()->GetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_COOKIES)) {
case CONTENT_SETTING_ALLOW: return kCookieEnabledIndex;
- case CONTENT_SETTING_ASK: return kCookieAskIndex;
- // If the cookie prompt is disabled, the radio button for "block" is at the
- // position of the "ask" radio in the old dialog.
- case CONTENT_SETTING_BLOCK: return disableCookiePrompt_ ?
- kCookieAskIndex :
- kCookieDisabledIndex;
+ case CONTENT_SETTING_BLOCK: return kCookieDisabledIndex;
default:
NOTREACHED();
return kCookieEnabledIndex;

Powered by Google App Engine
This is Rietveld 408576698