| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void SetBlockThirdPartyCookies(bool block); | 180 void SetBlockThirdPartyCookies(bool block); |
| 181 | 181 |
| 182 // Resets all settings levels. | 182 // Resets all settings levels. |
| 183 // | 183 // |
| 184 // This should only be called on the UI thread. | 184 // This should only be called on the UI thread. |
| 185 void ResetToDefaults(); | 185 void ResetToDefaults(); |
| 186 | 186 |
| 187 // Returns true if the default setting for the |content_type| is managed. | 187 // Returns true if the default setting for the |content_type| is managed. |
| 188 bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const; | 188 bool IsDefaultContentSettingManaged(ContentSettingsType content_type) const; |
| 189 | 189 |
| 190 // Detaches the HostContentSettingsMap from all Profile-related objects like |
| 191 // PrefService. This methods needs to be called before destroying the Profile. |
| 192 // Afterwards, none of the methods above that should only be called on the UI |
| 193 // thread should be called anymore. |
| 194 void ShutdownOnUIThread(); |
| 195 |
| 190 // NotificationObserver implementation. | 196 // NotificationObserver implementation. |
| 191 virtual void Observe(NotificationType type, | 197 virtual void Observe(NotificationType type, |
| 192 const NotificationSource& source, | 198 const NotificationSource& source, |
| 193 const NotificationDetails& details); | 199 const NotificationDetails& details); |
| 194 | 200 |
| 195 private: | 201 private: |
| 196 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 202 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
| 197 friend class DeleteTask<HostContentSettingsMap>; | 203 friend class DeleteTask<HostContentSettingsMap>; |
| 198 | 204 |
| 199 virtual ~HostContentSettingsMap(); | 205 virtual ~HostContentSettingsMap(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 mutable base::Lock lock_; | 241 mutable base::Lock lock_; |
| 236 | 242 |
| 237 // Misc global settings. | 243 // Misc global settings. |
| 238 bool block_third_party_cookies_; | 244 bool block_third_party_cookies_; |
| 239 bool is_block_third_party_cookies_managed_; | 245 bool is_block_third_party_cookies_managed_; |
| 240 | 246 |
| 241 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 247 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 242 }; | 248 }; |
| 243 | 249 |
| 244 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 250 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |