Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 EXTENSION_PROVIDER, | 45 EXTENSION_PROVIDER, |
| 46 PREF_PROVIDER, | 46 PREF_PROVIDER, |
| 47 DEFAULT_PROVIDER, | 47 DEFAULT_PROVIDER, |
| 48 NUM_PROVIDER_TYPES, | 48 NUM_PROVIDER_TYPES, |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 HostContentSettingsMap(PrefService* prefs, | 51 HostContentSettingsMap(PrefService* prefs, |
| 52 ExtensionService* extension_service, | 52 ExtensionService* extension_service, |
| 53 bool incognito); | 53 bool incognito); |
| 54 | 54 |
| 55 // In some cases, the ExtensionService is not available at the time the | |
| 56 // HostContentSettingsMap is constructed. In these cases, we register the | |
| 57 // service once it's available. | |
| 58 void RegisterExtensionService(ExtensionService* extension_service); | |
|
jochen (gone - plz use gerrit)
2012/05/24 11:04:03
Since I create a SpecialStoragePolicy during profi
| |
| 59 | |
| 55 static void RegisterUserPrefs(PrefService* prefs); | 60 static void RegisterUserPrefs(PrefService* prefs); |
| 56 | 61 |
| 57 // Returns the default setting for a particular content type. If |provider_id| | 62 // Returns the default setting for a particular content type. If |provider_id| |
| 58 // is not NULL, the id of the provider which provided the default setting is | 63 // is not NULL, the id of the provider which provided the default setting is |
| 59 // assigned to it. | 64 // assigned to it. |
| 60 // | 65 // |
| 61 // This may be called on any thread. | 66 // This may be called on any thread. |
| 62 ContentSetting GetDefaultContentSetting(ContentSettingsType content_type, | 67 ContentSetting GetDefaultContentSetting(ContentSettingsType content_type, |
| 63 std::string* provider_id) const; | 68 std::string* provider_id) const; |
| 64 | 69 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 // Content setting providers. | 225 // Content setting providers. |
| 221 ProviderMap content_settings_providers_; | 226 ProviderMap content_settings_providers_; |
| 222 | 227 |
| 223 // Used around accesses to the following objects to guarantee thread safety. | 228 // Used around accesses to the following objects to guarantee thread safety. |
| 224 mutable base::Lock lock_; | 229 mutable base::Lock lock_; |
| 225 | 230 |
| 226 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 231 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 227 }; | 232 }; |
| 228 | 233 |
| 229 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 234 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |