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

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

Issue 1320673013: Remove HostContentSettingsMap::IsSettingAllowedForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-issetting-allowed
Patch Set: 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_info.cc
diff --git a/components/content_settings/core/browser/content_settings_info.cc b/components/content_settings/core/browser/content_settings_info.cc
index 01fee49a33bf9d1be57c190d346d4afa900dd8be..976fec211eccb73ddd825f18154671ff542be749 100644
--- a/components/content_settings/core/browser/content_settings_info.cc
+++ b/components/content_settings/core/browser/content_settings_info.cc
@@ -4,14 +4,22 @@
#include "components/content_settings/core/browser/content_settings_info.h"
+#include "base/stl_util.h"
+
namespace content_settings {
ContentSettingsInfo::ContentSettingsInfo(
const WebsiteSettingsInfo* website_settings_info,
- const std::vector<std::string>& whitelisted_schemes)
+ const std::vector<std::string>& whitelisted_schemes,
+ const std::set<ContentSetting>& valid_settings)
: website_settings_info_(website_settings_info),
- whitelisted_schemes_(whitelisted_schemes) {}
+ whitelisted_schemes_(whitelisted_schemes),
+ valid_settings_(valid_settings) {}
ContentSettingsInfo::~ContentSettingsInfo() {}
+bool ContentSettingsInfo::IsSettingValid(ContentSetting setting) const {
engedy 2015/10/06 08:53:25 Either this, or something up the call hierarchy st
raymes 2015/10/12 00:03:12 Good catch. I agree with what you're saying in the
+ return ContainsKey(valid_settings_, setting);
+}
+
} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698