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

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

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.h
diff --git a/components/content_settings/core/browser/content_settings_info.h b/components/content_settings/core/browser/content_settings_info.h
index 9f336183fc34c3458e130713005fd680be4f4c2e..4ef2be3341f44c6b92ae809bd9b5911ff11eada0 100644
--- a/components/content_settings/core/browser/content_settings_info.h
+++ b/components/content_settings/core/browser/content_settings_info.h
@@ -5,10 +5,12 @@
#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_
#define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_
+#include <set>
#include <string>
#include <vector>
#include "base/macros.h"
+#include "components/content_settings/core/common/content_settings.h"
namespace content_settings {
@@ -18,7 +20,8 @@ class ContentSettingsInfo {
public:
// This object does not take ownership of |website_settings_info|.
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);
~ContentSettingsInfo();
const WebsiteSettingsInfo* website_settings_info() const {
@@ -28,9 +31,12 @@ class ContentSettingsInfo {
return whitelisted_schemes_;
}
+ bool IsSettingValid(ContentSetting setting) const;
+
private:
const WebsiteSettingsInfo* website_settings_info_;
- std::vector<std::string> whitelisted_schemes_;
+ const std::vector<std::string> whitelisted_schemes_;
+ const std::set<ContentSetting> valid_settings_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingsInfo);
};

Powered by Google App Engine
This is Rietveld 408576698