| Index: chrome/browser/content_settings/host_content_settings_map.h
|
| diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h
|
| index eae366e3dd05d672c0a2970bb6d5d80aa4ba742d..baaef20387f16a0653be38cc06f1adde8e541766 100644
|
| --- a/chrome/browser/content_settings/host_content_settings_map.h
|
| +++ b/chrome/browser/content_settings/host_content_settings_map.h
|
| @@ -32,6 +32,7 @@ class ProviderInterface;
|
| } // namespace content_settings
|
|
|
| class ContentSettingsDetails;
|
| +class CookieSettings;
|
| class ExtensionService;
|
| class GURL;
|
| class PrefService;
|
| @@ -39,7 +40,6 @@ class Profile;
|
|
|
| class HostContentSettingsMap
|
| : public content_settings::Observer,
|
| - public NotificationObserver,
|
| public base::RefCountedThreadSafe<HostContentSettingsMap> {
|
| public:
|
| typedef Tuple4<ContentSettingsPattern,
|
| @@ -77,16 +77,6 @@ class HostContentSettingsMap
|
| ContentSettingsType content_type,
|
| const std::string& resource_identifier) const;
|
|
|
| - // Gets the content setting for cookies. This takes the third party cookie
|
| - // flag into account, and therefore needs to know whether we read or write a
|
| - // cookie.
|
| - //
|
| - // This may be called on any thread.
|
| - ContentSetting GetCookieContentSetting(
|
| - const GURL& url,
|
| - const GURL& first_party_url,
|
| - bool setting_cookie) const;
|
| -
|
| // Returns a single ContentSetting which applies to the given URLs or
|
| // CONTENT_SETTING_DEFAULT, if no exception applies. Note that certain
|
| // internal schemes are whitelisted. For ContentSettingsTypes that require an
|
| @@ -131,6 +121,10 @@ class HostContentSettingsMap
|
| const std::string& resource_identifier,
|
| SettingsForOneType* settings) const;
|
|
|
| + // Returns a CookieSettings instance which can be used for reading and writing
|
| + // cookie-related content settings.
|
| + CookieSettings* GetCookieSettings();
|
| +
|
| // Sets the default setting for a particular content type. This method must
|
| // not be invoked on an incognito map.
|
| //
|
| @@ -172,18 +166,6 @@ class HostContentSettingsMap
|
| static bool IsSettingAllowedForType(ContentSetting setting,
|
| ContentSettingsType content_type);
|
|
|
| - // This setting trumps any host-specific settings.
|
| - bool BlockThirdPartyCookies() const { return block_third_party_cookies_; }
|
| - bool IsBlockThirdPartyCookiesManaged() const {
|
| - return is_block_third_party_cookies_managed_;
|
| - }
|
| -
|
| - // Sets whether we block all third-party cookies. This method must not be
|
| - // invoked on an incognito map.
|
| - //
|
| - // This should only be called on the UI thread.
|
| - void SetBlockThirdPartyCookies(bool block);
|
| -
|
| // Returns true if the default setting for the |content_type| is managed.
|
| bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const;
|
|
|
| @@ -200,10 +182,7 @@ class HostContentSettingsMap
|
| ContentSettingsType content_type,
|
| std::string resource_identifier);
|
|
|
| - // NotificationObserver implementation.
|
| - virtual void Observe(int type,
|
| - const NotificationSource& source,
|
| - const NotificationDetails& details);
|
| + static bool ShouldAllowAllContent(const GURL& url);
|
|
|
| private:
|
| friend class base::RefCountedThreadSafe<HostContentSettingsMap>;
|
| @@ -216,15 +195,9 @@ class HostContentSettingsMap
|
| ContentSettingsType content_type,
|
| const std::string& resource_identifier) const;
|
|
|
| - // Various migration methods (old cookie, popup and per-host data gets
|
| - // migrated to the new format).
|
| - void MigrateObsoleteCookiePref();
|
| -
|
| // Weak; owned by the Profile.
|
| PrefService* prefs_;
|
|
|
| - PrefChangeRegistrar pref_change_registrar_;
|
| -
|
| // Whether this settings map is for an OTR session.
|
| bool is_off_the_record_;
|
|
|
| @@ -240,12 +213,7 @@ class HostContentSettingsMap
|
| std::vector<linked_ptr<content_settings::ProviderInterface> >
|
| content_settings_providers_;
|
|
|
| - // Used around accesses to the following objects to guarantee thread safety.
|
| - mutable base::Lock lock_;
|
| -
|
| - // Misc global settings.
|
| - bool block_third_party_cookies_;
|
| - bool is_block_third_party_cookies_managed_;
|
| + scoped_refptr<CookieSettings> cookie_settings_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap);
|
| };
|
|
|