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

Unified Diff: chrome/browser/ui/gtk/website_settings_popup_gtk.cc

Issue 10456017: Add WebsiteSettingsUI for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 6 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 | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/website_settings_popup_gtk.cc
diff --git a/chrome/browser/ui/gtk/website_settings_popup_gtk.cc b/chrome/browser/ui/gtk/website_settings_popup_gtk.cc
index ec74b5e3c54eda3b0921287cf254e06de17638ae..b6099b9cfe701ef1ce908a9f34c2952c73223046 100644
--- a/chrome/browser/ui/gtk/website_settings_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/website_settings_popup_gtk.cc
@@ -38,33 +38,13 @@ namespace {
const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xff, 0xff, 0xff);
std::string PermissionTypeToString(ContentSettingsType type) {
- switch (type) {
- case CONTENT_SETTINGS_TYPE_POPUPS:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_TYPE_POPUPS);
- case CONTENT_SETTINGS_TYPE_PLUGINS:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_TYPE_PLUGINS);
- case CONTENT_SETTINGS_TYPE_GEOLOCATION:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_TYPE_LOCATION);
- case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_TYPE_NOTIFICATIONS);
- default:
- NOTREACHED();
- return "";
- }
+ return l10n_util::GetStringUTF8(
+ WebsiteSettingsUI::PermissionTypeToUIStringID(type));
}
std::string PermissionValueToString(ContentSetting value) {
- switch (value) {
- case CONTENT_SETTING_ALLOW:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_PERMISSION_ALLOW);
- case CONTENT_SETTING_BLOCK:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_PERMISSION_BLOCK);
- case CONTENT_SETTING_ASK:
- return l10n_util::GetStringUTF8(IDS_WEBSITE_SETTINGS_PERMISSION_ASK);
- default:
- NOTREACHED();
- return "";
- }
+ return l10n_util::GetStringUTF8(
+ WebsiteSettingsUI::PermissionValueToUIStringID(value));
}
} // namespace
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698