OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICE_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_SERVICE_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_SERVICE_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_SERVICE_
H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "extensions/browser/browser_context_keyed_api_factory.h" | 9 #include "extensions/browser/browser_context_keyed_api_factory.h" |
10 #include "extensions/browser/extension_prefs_observer.h" | 10 #include "extensions/browser/extension_prefs_observer.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Convenience function to get the service for some browser context. | 29 // Convenience function to get the service for some browser context. |
30 static ContentSettingsService* Get(content::BrowserContext* context); | 30 static ContentSettingsService* Get(content::BrowserContext* context); |
31 | 31 |
32 // BrowserContextKeyedAPI implementation. | 32 // BrowserContextKeyedAPI implementation. |
33 static BrowserContextKeyedAPIFactory<ContentSettingsService>* | 33 static BrowserContextKeyedAPIFactory<ContentSettingsService>* |
34 GetFactoryInstance(); | 34 GetFactoryInstance(); |
35 | 35 |
36 // ExtensionPrefsObserver implementation. | 36 // ExtensionPrefsObserver implementation. |
37 virtual void OnExtensionRegistered(const std::string& extension_id, | 37 virtual void OnExtensionRegistered(const std::string& extension_id, |
38 const base::Time& install_time, | 38 const base::Time& install_time, |
39 bool is_enabled) OVERRIDE; | 39 bool is_enabled) override; |
40 virtual void OnExtensionPrefsLoaded(const std::string& extension_id, | 40 virtual void OnExtensionPrefsLoaded(const std::string& extension_id, |
41 const ExtensionPrefs* prefs) OVERRIDE; | 41 const ExtensionPrefs* prefs) override; |
42 virtual void OnExtensionPrefsDeleted(const std::string& extension_id) | 42 virtual void OnExtensionPrefsDeleted(const std::string& extension_id) |
43 OVERRIDE; | 43 override; |
44 virtual void OnExtensionStateChanged(const std::string& extension_id, | 44 virtual void OnExtensionStateChanged(const std::string& extension_id, |
45 bool state) OVERRIDE; | 45 bool state) override; |
46 | 46 |
47 private: | 47 private: |
48 friend class BrowserContextKeyedAPIFactory<ContentSettingsService>; | 48 friend class BrowserContextKeyedAPIFactory<ContentSettingsService>; |
49 | 49 |
50 // BrowserContextKeyedAPI implementation. | 50 // BrowserContextKeyedAPI implementation. |
51 static const char* service_name() { return "ContentSettingsService"; } | 51 static const char* service_name() { return "ContentSettingsService"; } |
52 | 52 |
53 scoped_refptr<ContentSettingsStore> content_settings_store_; | 53 scoped_refptr<ContentSettingsStore> content_settings_store_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(ContentSettingsService); | 55 DISALLOW_COPY_AND_ASSIGN(ContentSettingsService); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace extensions | 58 } // namespace extensions |
59 | 59 |
60 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_SERVI
CE_H_ | 60 #endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_SERVI
CE_H_ |
OLD | NEW |