| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Maps hostnames to custom content settings. Written on the UI thread and read | 5 // Maps hostnames to custom content settings. Written on the UI thread and read |
| 6 // on any thread. One instance per profile. | 6 // on any thread. One instance per profile. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| 9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 void SetBlockThirdPartyCookies(bool block); | 179 void SetBlockThirdPartyCookies(bool block); |
| 180 | 180 |
| 181 // Resets all settings levels. | 181 // Resets all settings levels. |
| 182 // | 182 // |
| 183 // This should only be called on the UI thread. | 183 // This should only be called on the UI thread. |
| 184 void ResetToDefaults(); | 184 void ResetToDefaults(); |
| 185 | 185 |
| 186 // Returns true if the default setting for the |content_type| is managed. | 186 // Returns true if the default setting for the |content_type| is managed. |
| 187 bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const; | 187 bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const; |
| 188 | 188 |
| 189 // Detaches the HostContentSettingsMap from all Profile-related objects like |
| 190 // PrefService. This methods needs to be called before destroying the Profile. |
| 191 // Afterwards, none of the methods above that should only be called on the UI |
| 192 // thread should be called anymore. |
| 193 void ShutdownOnUIThread(); |
| 194 |
| 189 // NotificationObserver implementation. | 195 // NotificationObserver implementation. |
| 190 virtual void Observe(NotificationType type, | 196 virtual void Observe(NotificationType type, |
| 191 const NotificationSource& source, | 197 const NotificationSource& source, |
| 192 const NotificationDetails& details); | 198 const NotificationDetails& details); |
| 193 | 199 |
| 194 private: | 200 private: |
| 195 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 201 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
| 196 friend class DeleteTask<HostContentSettingsMap>; | 202 friend class DeleteTask<HostContentSettingsMap>; |
| 197 | 203 |
| 198 virtual ~HostContentSettingsMap(); | 204 virtual ~HostContentSettingsMap(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 mutable base::Lock lock_; | 240 mutable base::Lock lock_; |
| 235 | 241 |
| 236 // Misc global settings. | 242 // Misc global settings. |
| 237 bool block_third_party_cookies_; | 243 bool block_third_party_cookies_; |
| 238 bool is_block_third_party_cookies_managed_; | 244 bool is_block_third_party_cookies_managed_; |
| 239 | 245 |
| 240 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 246 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 241 }; | 247 }; |
| 242 | 248 |
| 243 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 249 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |