Index: chrome/browser/ui/webui/options/content_settings_handler.cc |
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc |
index 983dbed232fffe06c32da9c84a237649cfd8978d..898cf5a14936f91673116c931004a70d1d218a9a 100644 |
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc |
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc |
@@ -56,6 +56,8 @@ |
#endif |
using base::UserMetricsAction; |
+using content_settings::ContentSettingToString; |
+using content_settings::ContentSettingFromString; |
using extensions::APIPermission; |
namespace { |
@@ -135,39 +137,6 @@ ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { |
return CONTENT_SETTINGS_TYPE_DEFAULT; |
} |
-std::string ContentSettingToString(ContentSetting setting) { |
- switch (setting) { |
- case CONTENT_SETTING_ALLOW: |
- return "allow"; |
- case CONTENT_SETTING_ASK: |
- return "ask"; |
- case CONTENT_SETTING_BLOCK: |
- return "block"; |
- case CONTENT_SETTING_SESSION_ONLY: |
- return "session"; |
- case CONTENT_SETTING_DEFAULT: |
- return "default"; |
- case CONTENT_SETTING_NUM_SETTINGS: |
- NOTREACHED(); |
- } |
- |
- return std::string(); |
-} |
- |
-ContentSetting ContentSettingFromString(const std::string& name) { |
- if (name == "allow") |
- return CONTENT_SETTING_ALLOW; |
- if (name == "ask") |
- return CONTENT_SETTING_ASK; |
- if (name == "block") |
- return CONTENT_SETTING_BLOCK; |
- if (name == "session") |
- return CONTENT_SETTING_SESSION_ONLY; |
- |
- NOTREACHED() << name << " is not a recognized content setting."; |
- return CONTENT_SETTING_DEFAULT; |
-} |
- |
// Create a DictionaryValue* that will act as a data source for a single row |
// in a HostContentSettingsMap-controlled exceptions table (e.g., cookies). |
// Ownership of the pointer is passed to the caller. |