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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 12479005: Show strings in content settings bubble when access to cookies is allowed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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/ui/content_settings/content_setting_bubble_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 6d25f7726240a2748fd2b87f7bf64a216ae1c8a8..546bc9b901046627c581aad2e21ee6caac84b7d4 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -294,14 +294,19 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
{CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_UNBLOCK},
};
static const ContentSettingsTypeIdEntry kAllowedAllowIDs[] = {
+ // TODO(bauerb): The string shouldn't be "unblock" (they weren't blocked).
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_UNBLOCK},
{CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_ALLOWED_PPAPI_BROKER_NO_ACTION},
};
std::string radio_allow_label;
if (allowed) {
- radio_allow_label = l10n_util::GetStringUTF8(
- GetIdForContentType(kAllowedAllowIDs, arraysize(kAllowedAllowIDs),
- content_type()));
+ int resource_id = GetIdForContentType(kAllowedAllowIDs,
+ arraysize(kAllowedAllowIDs),
+ content_type());
+ radio_allow_label = (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) ?
+ l10n_util::GetStringFUTF8(resource_id, display_host) :
+ l10n_util::GetStringUTF8(resource_id);
} else if (resources.empty()) {
radio_allow_label = l10n_util::GetStringFUTF8(
GetIdForContentType(kBlockedAllowIDs, arraysize(kBlockedAllowIDs),
@@ -324,15 +329,19 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
{CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_BLOCKED_PPAPI_BROKER_NO_ACTION},
};
static const ContentSettingsTypeIdEntry kAllowedBlockIDs[] = {
+ // TODO(bauerb): The string should say "block".
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_NO_ACTION},
{CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_ALLOWED_PPAPI_BROKER_BLOCK},
};
std::string radio_block_label;
if (allowed) {
- radio_block_label = l10n_util::GetStringFUTF8(
- GetIdForContentType(kAllowedBlockIDs, arraysize(kAllowedBlockIDs),
- content_type()),
- display_host);
+ int resource_id = GetIdForContentType(kAllowedBlockIDs,
+ arraysize(kAllowedBlockIDs),
+ content_type());
+ radio_block_label = (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) ?
+ l10n_util::GetStringUTF8(resource_id) :
+ l10n_util::GetStringFUTF8(resource_id, display_host);
} else {
radio_block_label = l10n_util::GetStringUTF8(
GetIdForContentType(kBlockedBlockIDs, arraysize(kBlockedBlockIDs),
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698