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

Unified Diff: components/content_settings/core/browser/host_content_settings_map.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 comments Created 5 years, 1 month 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/host_content_settings_map.h
diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h
index d4935890889b6592f5ec035b6b560ba4bc67a63a..15fbdbc01145b4b4042ce95c2c1e3ecba89a0ac5 100644
--- a/components/content_settings/core/browser/host_content_settings_map.h
+++ b/components/content_settings/core/browser/host_content_settings_map.h
@@ -19,6 +19,7 @@
#include "base/threading/platform_thread.h"
#include "base/threading/thread_checker.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
+#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/content_settings/core/common/content_settings_types.h"
@@ -243,6 +244,16 @@ class HostContentSettingsMap : public content_settings::Observer,
private:
friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
friend class HostContentSettingsMapTest_NonDefaultSettings_Test;
+ friend
+ scoped_ptr<base::Value> content_settings::GetContentSettingValueAndPatterns(
+ const content_settings::ProviderInterface* provider,
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ const std::string& resource_identifier,
+ bool include_incognito,
+ ContentSettingsPattern* primary_pattern,
+ ContentSettingsPattern* secondary_pattern);
typedef std::map<ProviderType, content_settings::ProviderInterface*>
ProviderMap;
@@ -296,6 +307,12 @@ class HostContentSettingsMap : public content_settings::Observer,
content_settings::PrefProvider* GetPrefProvider();
+ // Prevents content settings marked INHERIT_IN_INCOGNITO_EXCEPT_ALLOW from
+ // inheriting CONTENT_SETTING_ALLOW settings from regular to incognito.
+ static ContentSetting CoerceSettingInheritedToIncognito(
+ ContentSettingsType content_type,
+ ContentSetting setting);
+
#ifndef NDEBUG
// This starts as the thread ID of the thread that constructs this
// object, and remains until used by a different thread, at which

Powered by Google App Engine
This is Rietveld 408576698