Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPERS_ H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPERS_ H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPERS_ H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPERS_ H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/content_settings/core/common/content_settings.h" | 10 #include "components/content_settings/core/common/content_settings.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // ContentSettingsType. Returns CONTENT_SETTINGS_TYPE_DEFAULT if the string | 26 // ContentSettingsType. Returns CONTENT_SETTINGS_TYPE_DEFAULT if the string |
| 27 // didn't specify a valid content settings type. | 27 // didn't specify a valid content settings type. |
| 28 ContentSettingsType StringToContentSettingsType( | 28 ContentSettingsType StringToContentSettingsType( |
| 29 const std::string& content_type); | 29 const std::string& content_type); |
| 30 // Returns a string representation of a ContentSettingsType. | 30 // Returns a string representation of a ContentSettingsType. |
| 31 std::string ContentSettingsTypeToString(ContentSettingsType type); | 31 std::string ContentSettingsTypeToString(ContentSettingsType type); |
| 32 | 32 |
| 33 // Converts a content setting string to the corresponding ContentSetting. | 33 // Converts a content setting string to the corresponding ContentSetting. |
| 34 // Returns true if |setting_str| specifies a valid content setting, | 34 // Returns true if |setting_str| specifies a valid content setting, |
| 35 // false otherwise. | 35 // false otherwise. |
| 36 bool StringToContentSetting(const std::string& setting_str, | 36 bool StringToContentSetting(const std::string& setting_str, |
|
Bernhard Bauer
2015/10/06 15:37:25
Let's remove this method, change the other's signa
Deepak
2015/10/07 04:39:43
Done.
| |
| 37 ContentSetting* setting); | 37 ContentSetting* setting); |
| 38 // Returns a string representation of a ContentSetting. | |
| 39 const char* ContentSettingToString(ContentSetting setting); | |
| 40 | 38 |
| 41 } // namespace content_settings_helpers | 39 } // namespace content_settings_helpers |
| 42 } // namespace extensions | 40 } // namespace extensions |
| 43 | 41 |
| 44 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPE RS_H__ | 42 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_HELPE RS_H__ |
| OLD | NEW |