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

Unified Diff: components/content_settings/core/browser/content_settings_utils.h

Issue 1372353004: Making structure for ContentSettings and its corresponding strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 2 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
Index: components/content_settings/core/browser/content_settings_utils.h
diff --git a/components/content_settings/core/browser/content_settings_utils.h b/components/content_settings/core/browser/content_settings_utils.h
index 2efa0ed4f9e8184afc12678dc10abad414dd400c..bbe2e9ca84edca47c9b24704ef242999996052e1 100644
--- a/components/content_settings/core/browser/content_settings_utils.h
+++ b/components/content_settings/core/browser/content_settings_utils.h
@@ -59,9 +59,15 @@ const char kChromeUIScheme[] = "chrome";
const char kExtensionScheme[] = "chrome-extension";
#endif
-std::string ContentSettingToString(ContentSetting setting);
-
-ContentSetting ContentSettingFromString(const std::string& name);
+// Converts a ContentSetting to the corresponding content setting string.
+// Returns true if |setting| specifies a valid content setting string, false
+// otherwise.
+bool ContentSettingToString(ContentSetting setting,
Bernhard Bauer 2015/10/07 11:38:21 I think for this method returning the old signatur
Deepak 2015/10/07 13:54:43 Done.
+ std::string* setting_string);
+
+// Converts a content setting string to the corresponding ContentSetting.
+// Returns true if |name| specifies a valid content setting, false otherwise.
+bool ContentSettingFromString(const std::string& name, ContentSetting* setting);
// Converts |Value| to |ContentSetting|.
ContentSetting ValueToContentSetting(const base::Value* value);

Powered by Google App Engine
This is Rietveld 408576698