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

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

Issue 2853983002: Ensure settings returned from Content Settings providers are valid (Closed)
Patch Set: Ensure settings returned from Content Settings providers are valid Created 3 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
Index: components/content_settings/core/browser/content_settings_pref.cc
diff --git a/components/content_settings/core/browser/content_settings_pref.cc b/components/content_settings/core/browser/content_settings_pref.cc
index f32e3018b4cc0828d4b5b7efa7a596d5f022d82b..514c4c718fb9726355a2bff60c10a7bceb2fbafb 100644
--- a/components/content_settings/core/browser/content_settings_pref.cc
+++ b/components/content_settings/core/browser/content_settings_pref.cc
@@ -253,6 +253,7 @@ void ContentSettingsPref::ReadContentSettingsFromPref() {
DCHECK(is_integer);
DCHECK_NE(CONTENT_SETTING_DEFAULT, setting);
std::unique_ptr<base::Value> setting_ptr(new base::Value(setting));
+ DCHECK(IsValueAllowedForType(setting_ptr.get(), content_type_));
msramek 2017/05/03 20:05:42 I'm slightly uncomfortable about this, since the u
raymes 2017/05/04 05:49:15 I agree - it could just be an annoyance. But we we
value_map_.SetValue(pattern_pair.first,
pattern_pair.second,
content_type_,

Powered by Google App Engine
This is Rietveld 408576698