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

Unified Diff: chrome/browser/dom_ui/content_settings_handler.cc

Issue 3145002: Content settings: allow "session only" type for cookies exceptions (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings_exceptions_area.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/content_settings_handler.cc
diff --git a/chrome/browser/dom_ui/content_settings_handler.cc b/chrome/browser/dom_ui/content_settings_handler.cc
index a6cb452bc57fa63796d8c35283796fdc98d5a6a9..d42bac63b0a2066d22925f69449448f42903dca4 100644
--- a/chrome/browser/dom_ui/content_settings_handler.cc
+++ b/chrome/browser/dom_ui/content_settings_handler.cc
@@ -72,6 +72,8 @@ std::string ContentSettingToString(ContentSetting setting) {
return "ask";
case CONTENT_SETTING_BLOCK:
return "block";
+ case CONTENT_SETTING_SESSION_ONLY:
+ return "session";
default:
NOTREACHED();
@@ -86,6 +88,8 @@ ContentSetting ContentSettingFromString(const std::string& name) {
return CONTENT_SETTING_ASK;
if (name == "block")
return CONTENT_SETTING_BLOCK;
+ if (name == "session")
+ return CONTENT_SETTING_SESSION_ONLY;
NOTREACHED();
return CONTENT_SETTING_DEFAULT;
@@ -111,6 +115,8 @@ void ContentSettingsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON));
localized_strings->SetString("blockException",
l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON));
+ localized_strings->SetString("sessionException",
+ l10n_util::GetStringUTF16(IDS_EXCEPTIONS_SESSION_ONLY_BUTTON));
localized_strings->SetString("addExceptionRow",
l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ADD_BUTTON));
localized_strings->SetString("removeExceptionRow",
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings_exceptions_area.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698