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