| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // ContentSettingsStore. | 45 // ContentSettingsStore. |
| 46 virtual void OnContentSettingChanged( | 46 virtual void OnContentSettingChanged( |
| 47 const std::string& extension_id, | 47 const std::string& extension_id, |
| 48 bool incognito) = 0; | 48 bool incognito) = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 ContentSettingsStore(); | 51 ContentSettingsStore(); |
| 52 | 52 |
| 53 // ////////////////////////////////////////////////////////////////////////// | 53 // ////////////////////////////////////////////////////////////////////////// |
| 54 | 54 |
| 55 scoped_ptr<content_settings::RuleIterator> GetRuleIterator( | 55 std::unique_ptr<content_settings::RuleIterator> GetRuleIterator( |
| 56 ContentSettingsType type, | 56 ContentSettingsType type, |
| 57 const content_settings::ResourceIdentifier& identifier, | 57 const content_settings::ResourceIdentifier& identifier, |
| 58 bool incognito) const; | 58 bool incognito) const; |
| 59 | 59 |
| 60 // Sets the content |setting| for |pattern| of extension |ext_id|. The | 60 // Sets the content |setting| for |pattern| of extension |ext_id|. The |
| 61 // |incognito| flag allow to set whether the provided setting is for | 61 // |incognito| flag allow to set whether the provided setting is for |
| 62 // incognito mode only. | 62 // incognito mode only. |
| 63 // Precondition: the extension must be registered. | 63 // Precondition: the extension must be registered. |
| 64 // This method should only be called on the UI thread. | 64 // This method should only be called on the UI thread. |
| 65 void SetExtensionContentSetting( | 65 void SetExtensionContentSetting( |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 base::ObserverList<Observer, false> observers_; | 137 base::ObserverList<Observer, false> observers_; |
| 138 | 138 |
| 139 mutable base::Lock lock_; | 139 mutable base::Lock lock_; |
| 140 | 140 |
| 141 DISALLOW_COPY_AND_ASSIGN(ContentSettingsStore); | 141 DISALLOW_COPY_AND_ASSIGN(ContentSettingsStore); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace extensions | 144 } // namespace extensions |
| 145 | 145 |
| 146 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE
_H_ | 146 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE
_H_ |
| OLD | NEW |