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 24 matching lines...) Expand all Loading... |
35 class ExtensionService; | 35 class ExtensionService; |
36 class GURL; | 36 class GURL; |
37 class PrefService; | 37 class PrefService; |
38 class Profile; | 38 class Profile; |
39 | 39 |
40 class HostContentSettingsMap | 40 class HostContentSettingsMap |
41 : public content_settings::Observer, | 41 : public content_settings::Observer, |
42 public NotificationObserver, | 42 public NotificationObserver, |
43 public base::RefCountedThreadSafe<HostContentSettingsMap> { | 43 public base::RefCountedThreadSafe<HostContentSettingsMap> { |
44 public: | 44 public: |
| 45 // TODO(markusheintz): I sold my soul to the devil on order to add this tuple. |
| 46 // I really want my soul back, so I really will change this ASAP. |
45 typedef Tuple4<ContentSettingsPattern, | 47 typedef Tuple4<ContentSettingsPattern, |
46 ContentSettingsPattern, | 48 ContentSettingsPattern, |
47 ContentSetting, | 49 ContentSetting, |
48 std::string> PatternSettingSourceTuple; | 50 std::string> PatternSettingSourceTuple; |
49 typedef std::vector<PatternSettingSourceTuple> SettingsForOneType; | 51 typedef std::vector<PatternSettingSourceTuple> SettingsForOneType; |
50 | 52 |
51 HostContentSettingsMap(PrefService* prefs, | 53 HostContentSettingsMap(PrefService* prefs, |
52 ExtensionService* extension_service, | 54 ExtensionService* extension_service, |
53 bool incognito); | 55 bool incognito); |
54 | 56 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 mutable base::Lock lock_; | 245 mutable base::Lock lock_; |
244 | 246 |
245 // Misc global settings. | 247 // Misc global settings. |
246 bool block_third_party_cookies_; | 248 bool block_third_party_cookies_; |
247 bool is_block_third_party_cookies_managed_; | 249 bool is_block_third_party_cookies_managed_; |
248 | 250 |
249 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 251 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
250 }; | 252 }; |
251 | 253 |
252 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 254 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
OLD | NEW |