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_EXTENSION_SYSTEM_IMPL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "extensions/browser/extension_system.h" | 9 #include "extensions/browser/extension_system.h" |
10 #include "extensions/common/one_shot_event.h" | 10 #include "extensions/common/one_shot_event.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // Implementation details: non-shared services are owned by | 25 // Implementation details: non-shared services are owned by |
26 // ExtensionSystemImpl, a KeyedService with separate incognito | 26 // ExtensionSystemImpl, a KeyedService with separate incognito |
27 // instances. A private Shared class (also a KeyedService, | 27 // instances. A private Shared class (also a KeyedService, |
28 // but with a shared instance for incognito) keeps the common services. | 28 // but with a shared instance for incognito) keeps the common services. |
29 class ExtensionSystemImpl : public ExtensionSystem { | 29 class ExtensionSystemImpl : public ExtensionSystem { |
30 public: | 30 public: |
31 explicit ExtensionSystemImpl(Profile* profile); | 31 explicit ExtensionSystemImpl(Profile* profile); |
32 virtual ~ExtensionSystemImpl(); | 32 virtual ~ExtensionSystemImpl(); |
33 | 33 |
34 // KeyedService implementation. | 34 // KeyedService implementation. |
35 virtual void Shutdown() OVERRIDE; | 35 virtual void Shutdown() override; |
36 | 36 |
37 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; | 37 virtual void InitForRegularProfile(bool extensions_enabled) override; |
38 | 38 |
39 virtual ExtensionService* extension_service() OVERRIDE; // shared | 39 virtual ExtensionService* extension_service() override; // shared |
40 virtual RuntimeData* runtime_data() OVERRIDE; // shared | 40 virtual RuntimeData* runtime_data() override; // shared |
41 virtual ManagementPolicy* management_policy() OVERRIDE; // shared | 41 virtual ManagementPolicy* management_policy() override; // shared |
42 // shared | 42 // shared |
43 virtual SharedUserScriptMaster* shared_user_script_master() OVERRIDE; | 43 virtual SharedUserScriptMaster* shared_user_script_master() override; |
44 virtual ProcessManager* process_manager() OVERRIDE; | 44 virtual ProcessManager* process_manager() override; |
45 virtual StateStore* state_store() OVERRIDE; // shared | 45 virtual StateStore* state_store() override; // shared |
46 virtual StateStore* rules_store() OVERRIDE; // shared | 46 virtual StateStore* rules_store() override; // shared |
47 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() | 47 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() |
48 OVERRIDE; // shared | 48 override; // shared |
49 virtual InfoMap* info_map() OVERRIDE; // shared | 49 virtual InfoMap* info_map() override; // shared |
50 virtual EventRouter* event_router() OVERRIDE; // shared | 50 virtual EventRouter* event_router() override; // shared |
51 virtual WarningService* warning_service() OVERRIDE; | 51 virtual WarningService* warning_service() override; |
52 virtual Blacklist* blacklist() OVERRIDE; // shared | 52 virtual Blacklist* blacklist() override; // shared |
53 virtual ErrorConsole* error_console() OVERRIDE; | 53 virtual ErrorConsole* error_console() override; |
54 virtual InstallVerifier* install_verifier() OVERRIDE; | 54 virtual InstallVerifier* install_verifier() override; |
55 virtual QuotaService* quota_service() OVERRIDE; // shared | 55 virtual QuotaService* quota_service() override; // shared |
56 | 56 |
57 virtual void RegisterExtensionWithRequestContexts( | 57 virtual void RegisterExtensionWithRequestContexts( |
58 const Extension* extension) OVERRIDE; | 58 const Extension* extension) override; |
59 | 59 |
60 virtual void UnregisterExtensionWithRequestContexts( | 60 virtual void UnregisterExtensionWithRequestContexts( |
61 const std::string& extension_id, | 61 const std::string& extension_id, |
62 const UnloadedExtensionInfo::Reason reason) OVERRIDE; | 62 const UnloadedExtensionInfo::Reason reason) override; |
63 | 63 |
64 virtual const OneShotEvent& ready() const OVERRIDE; | 64 virtual const OneShotEvent& ready() const override; |
65 virtual ContentVerifier* content_verifier() OVERRIDE; // shared | 65 virtual ContentVerifier* content_verifier() override; // shared |
66 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( | 66 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( |
67 const Extension* extension) OVERRIDE; | 67 const Extension* extension) override; |
68 | 68 |
69 virtual DeclarativeUserScriptMaster* | 69 virtual DeclarativeUserScriptMaster* |
70 GetDeclarativeUserScriptMasterByExtension( | 70 GetDeclarativeUserScriptMasterByExtension( |
71 const ExtensionId& extension_id) OVERRIDE; // shared | 71 const ExtensionId& extension_id) override; // shared |
72 | 72 |
73 private: | 73 private: |
74 friend class ExtensionSystemSharedFactory; | 74 friend class ExtensionSystemSharedFactory; |
75 | 75 |
76 // Owns the Extension-related systems that have a single instance | 76 // Owns the Extension-related systems that have a single instance |
77 // shared between normal and incognito profiles. | 77 // shared between normal and incognito profiles. |
78 class Shared : public KeyedService { | 78 class Shared : public KeyedService { |
79 public: | 79 public: |
80 explicit Shared(Profile* profile); | 80 explicit Shared(Profile* profile); |
81 virtual ~Shared(); | 81 virtual ~Shared(); |
82 | 82 |
83 // Initialization takes place in phases. | 83 // Initialization takes place in phases. |
84 virtual void InitPrefs(); | 84 virtual void InitPrefs(); |
85 // This must not be called until all the providers have been created. | 85 // This must not be called until all the providers have been created. |
86 void RegisterManagementPolicyProviders(); | 86 void RegisterManagementPolicyProviders(); |
87 void Init(bool extensions_enabled); | 87 void Init(bool extensions_enabled); |
88 | 88 |
89 // KeyedService implementation. | 89 // KeyedService implementation. |
90 virtual void Shutdown() OVERRIDE; | 90 virtual void Shutdown() override; |
91 | 91 |
92 StateStore* state_store(); | 92 StateStore* state_store(); |
93 StateStore* rules_store(); | 93 StateStore* rules_store(); |
94 ExtensionService* extension_service(); | 94 ExtensionService* extension_service(); |
95 RuntimeData* runtime_data(); | 95 RuntimeData* runtime_data(); |
96 ManagementPolicy* management_policy(); | 96 ManagementPolicy* management_policy(); |
97 SharedUserScriptMaster* shared_user_script_master(); | 97 SharedUserScriptMaster* shared_user_script_master(); |
98 Blacklist* blacklist(); | 98 Blacklist* blacklist(); |
99 InfoMap* info_map(); | 99 InfoMap* info_map(); |
100 LazyBackgroundTaskQueue* lazy_background_task_queue(); | 100 LazyBackgroundTaskQueue* lazy_background_task_queue(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // extension processes and those require access to the ResourceContext owned | 163 // extension processes and those require access to the ResourceContext owned |
164 // by |io_data_|. | 164 // by |io_data_|. |
165 scoped_ptr<ProcessManager> process_manager_; | 165 scoped_ptr<ProcessManager> process_manager_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 167 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
168 }; | 168 }; |
169 | 169 |
170 } // namespace extensions | 170 } // namespace extensions |
171 | 171 |
172 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 172 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
OLD | NEW |