| 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 | 10 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // PrefService. This methods needs to be called before destroying the Profile. | 190 // PrefService. This methods needs to be called before destroying the Profile. |
| 191 // Afterwards, none of the methods above that should only be called on the UI | 191 // Afterwards, none of the methods above that should only be called on the UI |
| 192 // thread should be called anymore. | 192 // thread should be called anymore. |
| 193 void ShutdownOnUIThread(); | 193 void ShutdownOnUIThread(); |
| 194 | 194 |
| 195 // content_settings::Observer implementation. | 195 // content_settings::Observer implementation. |
| 196 virtual void OnContentSettingChanged( | 196 virtual void OnContentSettingChanged( |
| 197 const ContentSettingsPattern& primary_pattern, | 197 const ContentSettingsPattern& primary_pattern, |
| 198 const ContentSettingsPattern& secondary_pattern, | 198 const ContentSettingsPattern& secondary_pattern, |
| 199 ContentSettingsType content_type, | 199 ContentSettingsType content_type, |
| 200 std::string resource_identifier) OVERRIDE; | 200 std::string resource_identifier) override; |
| 201 | 201 |
| 202 // Returns true if we should allow all content types for this URL. This is | 202 // Returns true if we should allow all content types for this URL. This is |
| 203 // true for various internal objects like chrome:// URLs, so UI and other | 203 // true for various internal objects like chrome:// URLs, so UI and other |
| 204 // things users think of as "not webpages" don't break. | 204 // things users think of as "not webpages" don't break. |
| 205 static bool ShouldAllowAllContent(const GURL& primary_url, | 205 static bool ShouldAllowAllContent(const GURL& primary_url, |
| 206 const GURL& secondary_url, | 206 const GURL& secondary_url, |
| 207 ContentSettingsType content_type); | 207 ContentSettingsType content_type); |
| 208 | 208 |
| 209 // Returns the ProviderType associated with the given source string. | 209 // Returns the ProviderType associated with the given source string. |
| 210 // TODO(estade): I regret adding this. At the moment there are no legitimate | 210 // TODO(estade): I regret adding this. At the moment there are no legitimate |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // time and by RegisterExtensionService, both of which should happen | 353 // time and by RegisterExtensionService, both of which should happen |
| 354 // before any other uses of it. | 354 // before any other uses of it. |
| 355 ProviderMap content_settings_providers_; | 355 ProviderMap content_settings_providers_; |
| 356 | 356 |
| 357 ObserverList<content_settings::Observer> observers_; | 357 ObserverList<content_settings::Observer> observers_; |
| 358 | 358 |
| 359 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 359 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 360 }; | 360 }; |
| 361 | 361 |
| 362 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 362 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |