| 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 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace content_settings { | 27 namespace content_settings { |
| 28 class OriginIdentifierValueMap; | 28 class OriginIdentifierValueMap; |
| 29 class RuleIterator; | 29 class RuleIterator; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace extensions { | 32 namespace extensions { |
| 33 | 33 |
| 34 // This class is the backend for extension-defined content settings. It is used | 34 // This class is the backend for extension-defined content settings. It is used |
| 35 // by the content_settings::ExtensionProvider to integrate its settings into the | 35 // by the content_settings::CustomExtensionProvider to integrate its settings |
| 36 // HostContentSettingsMap and by the content settings extension API to provide | 36 // into the HostContentSettingsMap and by the content settings extension API to |
| 37 // extensions with access to content settings. | 37 // provide extensions with access to content settings. |
| 38 class ContentSettingsStore | 38 class ContentSettingsStore |
| 39 : public base::RefCountedThreadSafe<ContentSettingsStore> { | 39 : public base::RefCountedThreadSafe<ContentSettingsStore> { |
| 40 public: | 40 public: |
| 41 class Observer { | 41 class Observer { |
| 42 public: | 42 public: |
| 43 virtual ~Observer() {} | 43 virtual ~Observer() {} |
| 44 | 44 |
| 45 // Called when a content setting changes in the | 45 // Called when a content setting changes in the |
| 46 // ContentSettingsStore. | 46 // ContentSettingsStore. |
| 47 virtual void OnContentSettingChanged( | 47 virtual void OnContentSettingChanged( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 ObserverList<Observer, false> observers_; | 138 ObserverList<Observer, false> observers_; |
| 139 | 139 |
| 140 mutable base::Lock lock_; | 140 mutable base::Lock lock_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(ContentSettingsStore); | 142 DISALLOW_COPY_AND_ASSIGN(ContentSettingsStore); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace extensions | 145 } // namespace extensions |
| 146 | 146 |
| 147 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE
_H_ | 147 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE
_H_ |
| OLD | NEW |