| 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. | |
| 47 typedef Tuple4<ContentSettingsPattern, | 45 typedef Tuple4<ContentSettingsPattern, |
| 48 ContentSettingsPattern, | 46 ContentSettingsPattern, |
| 49 ContentSetting, | 47 ContentSetting, |
| 50 std::string> PatternSettingSourceTuple; | 48 std::string> PatternSettingSourceTuple; |
| 51 typedef std::vector<PatternSettingSourceTuple> SettingsForOneType; | 49 typedef std::vector<PatternSettingSourceTuple> SettingsForOneType; |
| 52 | 50 |
| 53 HostContentSettingsMap(PrefService* prefs, | 51 HostContentSettingsMap(PrefService* prefs, |
| 54 ExtensionService* extension_service, | 52 ExtensionService* extension_service, |
| 55 bool incognito); | 53 bool incognito); |
| 56 | 54 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 mutable base::Lock lock_; | 243 mutable base::Lock lock_; |
| 246 | 244 |
| 247 // Misc global settings. | 245 // Misc global settings. |
| 248 bool block_third_party_cookies_; | 246 bool block_third_party_cookies_; |
| 249 bool is_block_third_party_cookies_managed_; | 247 bool is_block_third_party_cookies_managed_; |
| 250 | 248 |
| 251 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 249 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 252 }; | 250 }; |
| 253 | 251 |
| 254 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 252 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |