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 1edbce2410638bbc49f41baf422d9388f6a7a8f5..b88af2cb304fcbbf65a0189fc9ed92ed8439fde5 100644 |
--- a/components/content_settings/core/browser/host_content_settings_map.h |
+++ b/components/content_settings/core/browser/host_content_settings_map.h |
@@ -278,6 +278,19 @@ class HostContentSettingsMap : public content_settings::Observer, |
// Passes ownership of |clock|. |
void SetPrefClockForTesting(std::unique_ptr<base::Clock> clock); |
+ // Migrate old domain scoped ALLOW settings to be origin scoped for |
+ // ContentSettingsTypes which are domain scoped. Only narrow down ALLOW |
+ // domain settings to origins so that this will not cause privacy/security |
+ // issues. |
+ // |
+ // |after_sync| will be false when called upon construction of this object and |
+ // true when called by the sync layer after sync is completed. |
+ // TODO(lshang): https://crbug.com/621398 Remove this when clients have |
+ // migrated (~M56). |
+ void MigrateDomainScopedSettings(bool after_sync); |
+ |
+ base::WeakPtr<HostContentSettingsMap> GetWeakPtr(); |
+ |
private: |
friend class base::RefCountedThreadSafe<HostContentSettingsMap>; |
friend class HostContentSettingsMapTest_DomainToOriginMigrationStatus_Test; |
@@ -313,17 +326,6 @@ class HostContentSettingsMap : public content_settings::Observer, |
// leave in some code to remove old-format settings for a long time. |
void MigrateKeygenSettings(); |
- // Migrate old domain scoped ALLOW settings to be origin scoped for |
- // ContentSettingsTypes which are domain scoped. Only narrow down ALLOW |
- // domain settings to origins so that this will not cause privacy/security |
- // issues. |
- // |
- // |after_sync| will be false when called upon construction of this object and |
- // true when called by the sync layer after sync is completed. |
- // TODO(lshang): https://crbug.com/621398 Remove this when clients have |
- // migrated (~M56). |
- void MigrateDomainScopedSettings(bool after_sync); |
- |
// Collect UMA data about the number of exceptions. |
void RecordNumberOfExceptions(); |
@@ -400,6 +402,8 @@ class HostContentSettingsMap : public content_settings::Observer, |
base::ObserverList<content_settings::Observer> observers_; |
+ base::WeakPtrFactory<HostContentSettingsMap> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
}; |