Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Side by Side Diff: chrome/browser/extensions/extension_system.h

Issue 63933003: Moved ExtensionInfoMap and ExtensionsQuotaService to extensions/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_EXTENSION_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/common/extensions/extension.h" 12 #include "chrome/common/extensions/extension.h"
13 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 13 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
14 #include "extensions/common/one_shot_event.h" 14 #include "extensions/common/one_shot_event.h"
15 15
16 class ExtensionInfoMap;
17 class ExtensionProcessManager; 16 class ExtensionProcessManager;
18 class ExtensionService; 17 class ExtensionService;
19 class Profile; 18 class Profile;
20 19
21 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
22 namespace chromeos { 21 namespace chromeos {
23 class DeviceLocalAccountManagementPolicyProvider; 22 class DeviceLocalAccountManagementPolicyProvider;
24 } 23 }
25 #endif // defined(OS_CHROMEOS) 24 #endif // defined(OS_CHROMEOS)
26 25
27 namespace content { 26 namespace content {
28 class BrowserContext; 27 class BrowserContext;
29 } 28 }
30 29
31 namespace extensions { 30 namespace extensions {
32 class Blacklist; 31 class Blacklist;
33 class ErrorConsole; 32 class ErrorConsole;
34 class EventRouter; 33 class EventRouter;
35 class Extension; 34 class Extension;
36 class ExtensionSystemSharedFactory; 35 class ExtensionSystemSharedFactory;
37 class ExtensionWarningBadgeService; 36 class ExtensionWarningBadgeService;
38 class ExtensionWarningService; 37 class ExtensionWarningService;
38 class InfoMap;
39 class LazyBackgroundTaskQueue; 39 class LazyBackgroundTaskQueue;
40 class ManagementPolicy; 40 class ManagementPolicy;
41 class NavigationObserver; 41 class NavigationObserver;
42 class StandardManagementPolicyProvider; 42 class StandardManagementPolicyProvider;
43 class StateStore; 43 class StateStore;
44 class UserScriptMaster; 44 class UserScriptMaster;
45 45
46 // The ExtensionSystem manages the creation and destruction of services 46 // The ExtensionSystem manages the creation and destruction of services
47 // related to extensions. Most objects are shared between normal 47 // related to extensions. Most objects are shared between normal
48 // and incognito Profiles, except as called out in comments. 48 // and incognito Profiles, except as called out in comments.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // The ExtensionProcessManager is created at startup. 87 // The ExtensionProcessManager is created at startup.
88 virtual ExtensionProcessManager* process_manager() = 0; 88 virtual ExtensionProcessManager* process_manager() = 0;
89 89
90 // The StateStore is created at startup. 90 // The StateStore is created at startup.
91 virtual StateStore* state_store() = 0; 91 virtual StateStore* state_store() = 0;
92 92
93 // The rules store is created at startup. 93 // The rules store is created at startup.
94 virtual StateStore* rules_store() = 0; 94 virtual StateStore* rules_store() = 0;
95 95
96 // Returns the IO-thread-accessible extension data. 96 // Returns the IO-thread-accessible extension data.
97 virtual ExtensionInfoMap* info_map() = 0; 97 virtual InfoMap* info_map() = 0;
98 98
99 // The LazyBackgroundTaskQueue is created at startup. 99 // The LazyBackgroundTaskQueue is created at startup.
100 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() = 0; 100 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() = 0;
101 101
102 // The EventRouter is created at startup. 102 // The EventRouter is created at startup.
103 virtual EventRouter* event_router() = 0; 103 virtual EventRouter* event_router() = 0;
104 104
105 // The ExtensionWarningService is created at startup. 105 // The ExtensionWarningService is created at startup.
106 virtual ExtensionWarningService* warning_service() = 0; 106 virtual ExtensionWarningService* warning_service() = 0;
107 107
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool defer_background_creation) OVERRIDE; 147 bool defer_background_creation) OVERRIDE;
148 148
149 virtual ExtensionService* extension_service() OVERRIDE; // shared 149 virtual ExtensionService* extension_service() OVERRIDE; // shared
150 virtual ManagementPolicy* management_policy() OVERRIDE; // shared 150 virtual ManagementPolicy* management_policy() OVERRIDE; // shared
151 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared 151 virtual UserScriptMaster* user_script_master() OVERRIDE; // shared
152 virtual ExtensionProcessManager* process_manager() OVERRIDE; 152 virtual ExtensionProcessManager* process_manager() OVERRIDE;
153 virtual StateStore* state_store() OVERRIDE; // shared 153 virtual StateStore* state_store() OVERRIDE; // shared
154 virtual StateStore* rules_store() OVERRIDE; // shared 154 virtual StateStore* rules_store() OVERRIDE; // shared
155 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() 155 virtual LazyBackgroundTaskQueue* lazy_background_task_queue()
156 OVERRIDE; // shared 156 OVERRIDE; // shared
157 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared 157 virtual InfoMap* info_map() OVERRIDE; // shared
158 virtual EventRouter* event_router() OVERRIDE; // shared 158 virtual EventRouter* event_router() OVERRIDE; // shared
159 virtual ExtensionWarningService* warning_service() OVERRIDE; 159 virtual ExtensionWarningService* warning_service() OVERRIDE;
160 virtual Blacklist* blacklist() OVERRIDE; // shared 160 virtual Blacklist* blacklist() OVERRIDE; // shared
161 virtual ErrorConsole* error_console() OVERRIDE; 161 virtual ErrorConsole* error_console() OVERRIDE;
162 162
163 virtual void RegisterExtensionWithRequestContexts( 163 virtual void RegisterExtensionWithRequestContexts(
164 const Extension* extension) OVERRIDE; 164 const Extension* extension) OVERRIDE;
165 165
166 virtual void UnregisterExtensionWithRequestContexts( 166 virtual void UnregisterExtensionWithRequestContexts(
167 const std::string& extension_id, 167 const std::string& extension_id,
(...skipping 19 matching lines...) Expand all
187 187
188 // BrowserContextKeyedService implementation. 188 // BrowserContextKeyedService implementation.
189 virtual void Shutdown() OVERRIDE; 189 virtual void Shutdown() OVERRIDE;
190 190
191 StateStore* state_store(); 191 StateStore* state_store();
192 StateStore* rules_store(); 192 StateStore* rules_store();
193 ExtensionService* extension_service(); 193 ExtensionService* extension_service();
194 ManagementPolicy* management_policy(); 194 ManagementPolicy* management_policy();
195 UserScriptMaster* user_script_master(); 195 UserScriptMaster* user_script_master();
196 Blacklist* blacklist(); 196 Blacklist* blacklist();
197 ExtensionInfoMap* info_map(); 197 InfoMap* info_map();
198 LazyBackgroundTaskQueue* lazy_background_task_queue(); 198 LazyBackgroundTaskQueue* lazy_background_task_queue();
199 EventRouter* event_router(); 199 EventRouter* event_router();
200 ExtensionWarningService* warning_service(); 200 ExtensionWarningService* warning_service();
201 ErrorConsole* error_console(); 201 ErrorConsole* error_console();
202 const OneShotEvent& ready() const { return ready_; } 202 const OneShotEvent& ready() const { return ready_; }
203 203
204 private: 204 private:
205 Profile* profile_; 205 Profile* profile_;
206 206
207 // The services that are shared between normal and incognito profiles. 207 // The services that are shared between normal and incognito profiles.
208 208
209 scoped_ptr<StateStore> state_store_; 209 scoped_ptr<StateStore> state_store_;
210 scoped_ptr<StateStore> rules_store_; 210 scoped_ptr<StateStore> rules_store_;
211 // LazyBackgroundTaskQueue is a dependency of 211 // LazyBackgroundTaskQueue is a dependency of
212 // MessageService and EventRouter. 212 // MessageService and EventRouter.
213 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; 213 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_;
214 scoped_ptr<EventRouter> event_router_; 214 scoped_ptr<EventRouter> event_router_;
215 scoped_ptr<NavigationObserver> navigation_observer_; 215 scoped_ptr<NavigationObserver> navigation_observer_;
216 scoped_refptr<UserScriptMaster> user_script_master_; 216 scoped_refptr<UserScriptMaster> user_script_master_;
217 scoped_ptr<Blacklist> blacklist_; 217 scoped_ptr<Blacklist> blacklist_;
218 // StandardManagementPolicyProvider depends on Blacklist. 218 // StandardManagementPolicyProvider depends on Blacklist.
219 scoped_ptr<StandardManagementPolicyProvider> 219 scoped_ptr<StandardManagementPolicyProvider>
220 standard_management_policy_provider_; 220 standard_management_policy_provider_;
221 // ExtensionService depends on StateStore and Blacklist. 221 // ExtensionService depends on StateStore and Blacklist.
222 scoped_ptr<ExtensionService> extension_service_; 222 scoped_ptr<ExtensionService> extension_service_;
223 scoped_ptr<ManagementPolicy> management_policy_; 223 scoped_ptr<ManagementPolicy> management_policy_;
224 // extension_info_map_ needs to outlive extension_process_manager_. 224 // extension_info_map_ needs to outlive extension_process_manager_.
225 scoped_refptr<ExtensionInfoMap> extension_info_map_; 225 scoped_refptr<InfoMap> extension_info_map_;
226 scoped_ptr<ExtensionWarningService> extension_warning_service_; 226 scoped_ptr<ExtensionWarningService> extension_warning_service_;
227 scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_; 227 scoped_ptr<ExtensionWarningBadgeService> extension_warning_badge_service_;
228 scoped_ptr<ErrorConsole> error_console_; 228 scoped_ptr<ErrorConsole> error_console_;
229 229
230 #if defined(OS_CHROMEOS) 230 #if defined(OS_CHROMEOS)
231 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> 231 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider>
232 device_local_account_management_policy_provider_; 232 device_local_account_management_policy_provider_;
233 #endif 233 #endif
234 234
235 OneShotEvent ready_; 235 OneShotEvent ready_;
236 }; 236 };
237 237
238 Profile* profile_; 238 Profile* profile_;
239 239
240 Shared* shared_; 240 Shared* shared_;
241 241
242 // |extension_process_manager_| must be destroyed before the Profile's 242 // |extension_process_manager_| must be destroyed before the Profile's
243 // |io_data_|. While |extension_process_manager_| still lives, we handle 243 // |io_data_|. While |extension_process_manager_| still lives, we handle
244 // incoming resource requests from extension processes and those require 244 // incoming resource requests from extension processes and those require
245 // access to the ResourceContext owned by |io_data_|. 245 // access to the ResourceContext owned by |io_data_|.
246 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 246 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
247 247
248 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 248 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
249 }; 249 };
250 250
251 } // namespace extensions 251 } // namespace extensions
252 252
253 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 253 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698