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

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

Issue 1038203003: Default Provider style fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to reset(release()). Created 5 years, 8 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 | « components/content_settings/core/browser/content_settings_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/content_settings/core/browser/content_settings_utils.cc
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
index c8dfe50bdfb3288b53062a38c63371ad8916b7ee..a67bb7de3ba994faa87c3f823ca87d1ef03c8471 100644
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -169,6 +169,14 @@ bool ParseContentSettingValue(const base::Value* value,
return *setting != CONTENT_SETTING_DEFAULT;
}
+scoped_ptr<base::Value> ContentSettingToValue(ContentSetting setting) {
+ if (setting <= CONTENT_SETTING_DEFAULT ||
+ setting >= CONTENT_SETTING_NUM_SETTINGS) {
+ return nullptr;
+ }
+ return make_scoped_ptr(new base::FundamentalValue(setting));
+}
+
base::Value* GetContentSettingValueAndPatterns(
const ProviderInterface* provider,
const GURL& primary_url,
« no previous file with comments | « components/content_settings/core/browser/content_settings_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698