| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // |resource_identifier|. Setting the value to NULL causes the default value | 140 // |resource_identifier|. Setting the value to NULL causes the default value |
| 141 // for that type to be used when loading pages matching this pattern. | 141 // for that type to be used when loading pages matching this pattern. |
| 142 // | 142 // |
| 143 // Takes ownership of the passed value. | 143 // Takes ownership of the passed value. |
| 144 void SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, | 144 void SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, |
| 145 const ContentSettingsPattern& secondary_pattern, | 145 const ContentSettingsPattern& secondary_pattern, |
| 146 ContentSettingsType content_type, | 146 ContentSettingsType content_type, |
| 147 const std::string& resource_identifier, | 147 const std::string& resource_identifier, |
| 148 base::Value* value); | 148 base::Value* value); |
| 149 | 149 |
| 150 // Sets the most specific rule that currently defines the permission for the |
| 151 // given permission type. |
| 152 void SetNarrowestWebsiteSetting( |
| 153 const ContentSettingsPattern& primary_pattern, |
| 154 const ContentSettingsPattern& secondary_pattern, |
| 155 ContentSettingsType content_type, |
| 156 const std::string& resource_identifier, |
| 157 ContentSetting setting, |
| 158 content_settings::SettingInfo existing_info); |
| 159 |
| 150 // Convenience method to add a content setting for the given URLs, making sure | 160 // Convenience method to add a content setting for the given URLs, making sure |
| 151 // that there is no setting overriding it. | 161 // that there is no setting overriding it. |
| 152 // | 162 // |
| 153 // This should only be called on the UI thread. | 163 // This should only be called on the UI thread. |
| 154 void AddExceptionForURL(const GURL& primary_url, | 164 void AddExceptionForURL(const GURL& primary_url, |
| 155 const GURL& secondary_url, | 165 const GURL& secondary_url, |
| 156 ContentSettingsType content_type, | 166 ContentSettingsType content_type, |
| 157 ContentSetting setting); | 167 ContentSetting setting); |
| 158 | 168 |
| 159 // Clears all host-specific settings for one content type. | 169 // Clears all host-specific settings for one content type. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 307 |
| 298 // Content setting providers. This is only modified at construction | 308 // Content setting providers. This is only modified at construction |
| 299 // time and by RegisterExtensionService, both of which should happen | 309 // time and by RegisterExtensionService, both of which should happen |
| 300 // before any other uses of it. | 310 // before any other uses of it. |
| 301 ProviderMap content_settings_providers_; | 311 ProviderMap content_settings_providers_; |
| 302 | 312 |
| 303 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 313 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 304 }; | 314 }; |
| 305 | 315 |
| 306 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ | 316 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |