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

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

Issue 2963006: Remove the cookie prompt from the settings UI and migrate prefs from ask to block. (Closed)
Patch Set: updates Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/content_exceptions_window_controller.mm
diff --git a/chrome/browser/cocoa/content_exceptions_window_controller.mm b/chrome/browser/cocoa/content_exceptions_window_controller.mm
index dd7bd55f41ab71a1b840de26d2cf4841c9b201d9..86de89623a405761067497c9fc786e9be64a13b1 100644
--- a/chrome/browser/cocoa/content_exceptions_window_controller.mm
+++ b/chrome/browser/cocoa/content_exceptions_window_controller.mm
@@ -123,15 +123,14 @@ NSString* GetWindowTitle(ContentSettingsType settingsType) {
const CGFloat kButtonBarHeight = 35.0;
-// The settings shown in the combobox if showAsk_ is false;
-const ContentSetting kNoAskSettings[] = { CONTENT_SETTING_ALLOW,
- CONTENT_SETTING_BLOCK };
+// The settings shown in the combobox if showSession_ is false;
+const ContentSetting kNoSessionSettings[] = { CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_BLOCK };
-// The settings shown in the combobox if showAsk_ is true;
-const ContentSetting kAskSettings[] = { CONTENT_SETTING_ALLOW,
- CONTENT_SETTING_ASK,
- CONTENT_SETTING_SESSION_ONLY,
- CONTENT_SETTING_BLOCK };
+// The settings shown in the combobox if showSession_ is true;
+const ContentSetting kSessionSettings[] = { CONTENT_SETTING_ALLOW,
+ CONTENT_SETTING_SESSION_ONLY,
+ CONTENT_SETTING_BLOCK };
} // namespace
@@ -168,7 +167,7 @@ static ContentExceptionsWindowController*
otrSettingsMap_ = otrSettingsMap;
model_.reset(new ContentExceptionsTableModel(
settingsMap_, otrSettingsMap_, settingsType_));
- showAsk_ = settingsType_ == CONTENT_SETTINGS_TYPE_COOKIES;
+ showSession_ = settingsType_ == CONTENT_SETTINGS_TYPE_COOKIES;
otrAllowed_ = otrSettingsMap != NULL;
tableObserver_.reset(new UpdatingContentSettingsObserver(self));
updatesEnabled_ = YES;
@@ -494,7 +493,8 @@ static ContentExceptionsWindowController*
}
- (size_t)menuItemCount {
- return showAsk_ ? arraysize(kAskSettings) : arraysize(kNoAskSettings);
+ return showSession_ ?
+ arraysize(kSessionSettings) : arraysize(kNoSessionSettings);
}
- (NSString*)titleForIndex:(size_t)index {
@@ -503,8 +503,6 @@ static ContentExceptionsWindowController*
return l10n_util::GetNSStringWithFixup(IDS_EXCEPTIONS_ALLOW_BUTTON);
case CONTENT_SETTING_BLOCK:
return l10n_util::GetNSStringWithFixup(IDS_EXCEPTIONS_BLOCK_BUTTON);
- case CONTENT_SETTING_ASK:
- return l10n_util::GetNSStringWithFixup(IDS_EXCEPTIONS_ASK_BUTTON);
case CONTENT_SETTING_SESSION_ONLY:
return l10n_util::GetNSStringWithFixup(
IDS_EXCEPTIONS_SESSION_ONLY_BUTTON);
@@ -515,7 +513,7 @@ static ContentExceptionsWindowController*
}
- (ContentSetting)settingForIndex:(size_t)index {
- return showAsk_ ? kAskSettings[index] : kNoAskSettings[index];
+ return showSession_ ? kSessionSettings[index] : kNoSessionSettings[index];
}
- (size_t)indexForSetting:(ContentSetting)setting {

Powered by Google App Engine
This is Rietveld 408576698