| 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 // Interface for objects providing content setting rules. | 5 // Interface for objects providing content setting rules. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| 9 | 9 |
| 10 #define NO_RESOURCE_IDENTIFIER std::string() | 10 #define NO_RESOURCE_IDENTIFIER std::string() |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // |value|. Otherwise false is returned and the ownership of the |value| stays | 47 // |value|. Otherwise false is returned and the ownership of the |value| stays |
| 48 // with the caller. | 48 // with the caller. |
| 49 // | 49 // |
| 50 // This should only be called on the UI thread, and not after | 50 // This should only be called on the UI thread, and not after |
| 51 // ShutdownOnUIThread has been called. | 51 // ShutdownOnUIThread has been called. |
| 52 virtual bool SetWebsiteSetting( | 52 virtual bool SetWebsiteSetting( |
| 53 const ContentSettingsPattern& primary_pattern, | 53 const ContentSettingsPattern& primary_pattern, |
| 54 const ContentSettingsPattern& secondary_pattern, | 54 const ContentSettingsPattern& secondary_pattern, |
| 55 ContentSettingsType content_type, | 55 ContentSettingsType content_type, |
| 56 const ResourceIdentifier& resource_identifier, | 56 const ResourceIdentifier& resource_identifier, |
| 57 Value* value) = 0; | 57 base::Value* value) = 0; |
| 58 | 58 |
| 59 // Resets all content settings for the given |content_type| and empty resource | 59 // Resets all content settings for the given |content_type| and empty resource |
| 60 // identifier to CONTENT_SETTING_DEFAULT. | 60 // identifier to CONTENT_SETTING_DEFAULT. |
| 61 // | 61 // |
| 62 // This should only be called on the UI thread, and not after | 62 // This should only be called on the UI thread, and not after |
| 63 // ShutdownOnUIThread has been called. | 63 // ShutdownOnUIThread has been called. |
| 64 virtual void ClearAllContentSettingsRules( | 64 virtual void ClearAllContentSettingsRules( |
| 65 ContentSettingsType content_type) = 0; | 65 ContentSettingsType content_type) = 0; |
| 66 | 66 |
| 67 // Detaches the Provider from all Profile-related objects like PrefService. | 67 // Detaches the Provider from all Profile-related objects like PrefService. |
| 68 // This methods needs to be called before destroying the Profile. | 68 // This methods needs to be called before destroying the Profile. |
| 69 // Afterwards, none of the methods above that should only be called on the UI | 69 // Afterwards, none of the methods above that should only be called on the UI |
| 70 // thread should be called anymore. | 70 // thread should be called anymore. |
| 71 virtual void ShutdownOnUIThread() = 0; | 71 virtual void ShutdownOnUIThread() = 0; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace content_settings | 74 } // namespace content_settings |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ | 76 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ |
| OLD | NEW |