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

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

Issue 1442083002: Stop inheriting push notification permissions from regular to incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review nits Created 5 years 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 4ef2be3341f44c6b92ae809bd9b5911ff11eada0..b7018dfff5209db38fb0b1c92d812f998764edfe 100644
--- a/components/content_settings/core/browser/content_settings_info.h
+++ b/components/content_settings/core/browser/content_settings_info.h
@@ -18,10 +18,22 @@ class WebsiteSettingsInfo;
class ContentSettingsInfo {
public:
+ enum IncognitoBehavior {
+ // Content setting will be inherited from regular to incognito profiles
+ // as usual.
+ INHERIT_IN_INCOGNITO,
+
+ // Content setting will only partially inherit from regular to incognito
+ // profiles: BLOCK will inherit as usual, but ALLOW will become ASK.
+ // This is unusual, so seek privacy review before using this.
+ INHERIT_IN_INCOGNITO_EXCEPT_ALLOW
+ };
+
// 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::set<ContentSetting>& valid_settings);
+ const std::set<ContentSetting>& valid_settings,
+ IncognitoBehavior incognito_behavior);
~ContentSettingsInfo();
const WebsiteSettingsInfo* website_settings_info() const {
@@ -33,10 +45,13 @@ class ContentSettingsInfo {
bool IsSettingValid(ContentSetting setting) const;
+ IncognitoBehavior incognito_behavior() const { return incognito_behavior_; }
+
private:
const WebsiteSettingsInfo* website_settings_info_;
const std::vector<std::string> whitelisted_schemes_;
const std::set<ContentSetting> valid_settings_;
+ const IncognitoBehavior incognito_behavior_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingsInfo);
};

Powered by Google App Engine
This is Rietveld 408576698