Chromium Code Reviews| Index: chrome/browser/extensions/api/api_function.h |
| diff --git a/chrome/browser/extensions/api/api_function.h b/chrome/browser/extensions/api/api_function.h |
| index 2a91e304dc1339881ec363290725594f35f4954b..94129c285b430a259b0c9807f0ca1558f62ea342 100644 |
| --- a/chrome/browser/extensions/api/api_function.h |
| +++ b/chrome/browser/extensions/api/api_function.h |
| @@ -6,22 +6,22 @@ |
| #define CHROME_BROWSER_EXTENSIONS_API_API_FUNCTION_H_ |
| #include "chrome/browser/extensions/extension_function.h" |
| -#include "chrome/browser/extensions/api/api_resource.h" |
| #include "content/public/browser/browser_thread.h" |
| -class ExtensionService; |
| - |
| namespace extensions { |
| -class APIResourceController; |
| -class APIResourceEventNotifier; |
| +class ApiResourceEventNotifier; |
| -// AsyncAPIFunction provides convenient thread management for APIs that need to |
| +// AsyncApiFunction provides convenient thread management for APIs that need to |
| // do essentially all their work on a thread other than the UI thread. |
| -class AsyncAPIFunction : public AsyncExtensionFunction { |
| +class AsyncApiFunction : public AsyncExtensionFunction { |
| protected: |
| - AsyncAPIFunction(); |
| - virtual ~AsyncAPIFunction() {} |
| + AsyncApiFunction(); |
| + virtual ~AsyncApiFunction() {} |
| + |
| + // Like Prepare(), but for common work that doesn't need to be as |
| + // specialized. |
|
asargent_no_longer_on_chrome
2012/07/16 18:08:25
comment nit: when I first read this I had a hard t
|
| + virtual bool PrePrepare(); |
| // Set up for work (e.g., validate arguments). Guaranteed to happen on UI |
| // thread. |
| @@ -34,7 +34,7 @@ class AsyncAPIFunction : public AsyncExtensionFunction { |
| // Start the asynchronous work. Guraranteed to happen on requested thread. |
| virtual void AsyncWorkStart(); |
| - // Notify AsyncIOAPIFunction that the work is completed |
| + // Notify AsyncIOApiFunction that the work is completed |
| void AsyncWorkCompleted(); |
| // Respond. Guaranteed to happen on UI thread. |
| @@ -51,10 +51,7 @@ class AsyncAPIFunction : public AsyncExtensionFunction { |
| int DeprecatedExtractSrcId(size_t argument_position); |
| // Utility. |
| - APIResourceEventNotifier* CreateEventNotifier(int src_id); |
| - |
| - // Access to the controller singleton. |
| - APIResourceController* controller(); |
| + ApiResourceEventNotifier* CreateEventNotifier(int src_id); |
| // ExtensionFunction::RunImpl() |
| virtual bool RunImpl() OVERRIDE; |
| @@ -71,8 +68,6 @@ class AsyncAPIFunction : public AsyncExtensionFunction { |
| // If you don't want your Work() method to happen on the IO thread, then set |
| // this to the thread that you do want, preferably in Prepare(). |
| content::BrowserThread::ID work_thread_id_; |
| - |
| - ExtensionService* extension_service_; |
| }; |
| } // namespace extensions |