Chromium Code Reviews| 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 531952ecab655c7044bc120379e1a04836c9766c..1f62241672e4ab7107510409f639eaac1564d121 100644 |
| --- a/chrome/browser/ui/webui/options/content_settings_handler.cc |
| +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc |
| @@ -57,6 +57,8 @@ |
| using base::UserMetricsAction; |
| using extensions::APIPermission; |
| +using content_settings::ContentSettingToString; |
|
Bernhard Bauer
2014/08/15 14:53:05
Move this before extensions::
Daniel Nishi
2014/08/15 16:56:45
Done.
|
| +using content_settings::ContentSettingFromString; |
| 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. |