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

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

Issue 10407105: Improve error messaging of webRequest API in case of conflicts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Store ExtensionWarnings as values in set rather than pointers Created 8 years, 3 months 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"
(...skipping 12 matching lines...) Expand all
23 class Profile; 23 class Profile;
24 24
25 namespace extensions { 25 namespace extensions {
26 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem 26 // Unfortunately, for the ApiResourceManager<> template classes, we don't seem
27 // to be able to forward-declare because of compilation errors on Windows. 27 // to be able to forward-declare because of compilation errors on Windows.
28 class AlarmManager; 28 class AlarmManager;
29 class EventRouter; 29 class EventRouter;
30 class Extension; 30 class Extension;
31 class ExtensionPrefs; 31 class ExtensionPrefs;
32 class ExtensionSystemSharedFactory; 32 class ExtensionSystemSharedFactory;
33 class ExtensionWarningService;
33 class LazyBackgroundTaskQueue; 34 class LazyBackgroundTaskQueue;
34 class ManagementPolicy; 35 class ManagementPolicy;
35 class MessageService; 36 class MessageService;
36 class NavigationObserver; 37 class NavigationObserver;
37 class RulesRegistryService; 38 class RulesRegistryService;
38 class ShellWindowGeometryCache; 39 class ShellWindowGeometryCache;
39 class StateStore; 40 class StateStore;
40 class UserScriptMaster; 41 class UserScriptMaster;
41 42
42 // The ExtensionSystem manages the creation and destruction of services 43 // The ExtensionSystem manages the creation and destruction of services
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 serial_connection_manager() = 0; 110 serial_connection_manager() = 0;
110 111
111 // The Socket ResourceManager is created at startup. 112 // The Socket ResourceManager is created at startup.
112 virtual ApiResourceManager<Socket>* 113 virtual ApiResourceManager<Socket>*
113 socket_manager() = 0; 114 socket_manager() = 0;
114 115
115 // The UsbDeviceResource ResourceManager is created at startup. 116 // The UsbDeviceResource ResourceManager is created at startup.
116 virtual ApiResourceManager<UsbDeviceResource>* 117 virtual ApiResourceManager<UsbDeviceResource>*
117 usb_device_resource_manager() = 0; 118 usb_device_resource_manager() = 0;
118 119
120 // The ExtensionWarningService is created at startup.
121 virtual ExtensionWarningService* warning_service() = 0;
122
119 // Called by the ExtensionService that lives in this system. Gives the 123 // Called by the ExtensionService that lives in this system. Gives the
120 // info map a chance to react to the load event before the EXTENSION_LOADED 124 // info map a chance to react to the load event before the EXTENSION_LOADED
121 // notification has fired. The purpose for handling this event first is to 125 // notification has fired. The purpose for handling this event first is to
122 // avoid race conditions by making sure URLRequestContexts learn about new 126 // avoid race conditions by making sure URLRequestContexts learn about new
123 // extensions before anything else needs them to know. 127 // extensions before anything else needs them to know.
124 virtual void RegisterExtensionWithRequestContexts( 128 virtual void RegisterExtensionWithRequestContexts(
125 const Extension* extension) {} 129 const Extension* extension) {}
126 130
127 // Called by the ExtensionService that lives in this system. Lets the 131 // Called by the ExtensionService that lives in this system. Lets the
128 // info map clean up its RequestContexts once all the listeners to the 132 // info map clean up its RequestContexts once all the listeners to the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared 165 virtual ExtensionInfoMap* info_map() OVERRIDE; // shared
162 virtual MessageService* message_service() OVERRIDE; // shared 166 virtual MessageService* message_service() OVERRIDE; // shared
163 virtual EventRouter* event_router() OVERRIDE; // shared 167 virtual EventRouter* event_router() OVERRIDE; // shared
164 virtual RulesRegistryService* rules_registry_service() 168 virtual RulesRegistryService* rules_registry_service()
165 OVERRIDE; // shared 169 OVERRIDE; // shared
166 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() 170 virtual ApiResourceManager<SerialConnection>* serial_connection_manager()
167 OVERRIDE; 171 OVERRIDE;
168 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; 172 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE;
169 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() 173 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager()
170 OVERRIDE; 174 OVERRIDE;
175 virtual ExtensionWarningService* warning_service() OVERRIDE;
171 176
172 virtual void RegisterExtensionWithRequestContexts( 177 virtual void RegisterExtensionWithRequestContexts(
173 const Extension* extension) OVERRIDE; 178 const Extension* extension) OVERRIDE;
174 179
175 virtual void UnregisterExtensionWithRequestContexts( 180 virtual void UnregisterExtensionWithRequestContexts(
176 const std::string& extension_id, 181 const std::string& extension_id,
177 const extension_misc::UnloadedExtensionReason reason) OVERRIDE; 182 const extension_misc::UnloadedExtensionReason reason) OVERRIDE;
178 183
179 private: 184 private:
180 friend class ExtensionSystemSharedFactory; 185 friend class ExtensionSystemSharedFactory;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // incoming resource requests from extension processes and those require 242 // incoming resource requests from extension processes and those require
238 // access to the ResourceContext owned by |io_data_|. 243 // access to the ResourceContext owned by |io_data_|.
239 scoped_ptr<ExtensionProcessManager> extension_process_manager_; 244 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
240 scoped_ptr<AlarmManager> alarm_manager_; 245 scoped_ptr<AlarmManager> alarm_manager_;
241 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_; 246 scoped_ptr<ApiResourceManager<SerialConnection> > serial_connection_manager_;
242 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; 247 scoped_ptr<ApiResourceManager<Socket> > socket_manager_;
243 scoped_ptr<ApiResourceManager< 248 scoped_ptr<ApiResourceManager<
244 UsbDeviceResource> > usb_device_resource_manager_; 249 UsbDeviceResource> > usb_device_resource_manager_;
245 scoped_ptr<RulesRegistryService> rules_registry_service_; 250 scoped_ptr<RulesRegistryService> rules_registry_service_;
246 251
252 scoped_ptr<ExtensionWarningService> extension_warning_service_;
247 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 253 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
248 }; 254 };
249 255
250 } // namespace extensions 256 } // namespace extensions
251 257
252 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_ 258 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698