diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-03 03:41:43 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-03 03:41:43 +0000 |
commit | a0c91a9ffb1db127cf1f06e285b208a544ed4567 (patch) | |
tree | fe0e8f09a1c04cab35592cd46f9c01c045f95681 /chrome/browser/extensions/api/processes | |
parent | 68d3f6bbacbde53e968ae36ae3e4231ea1a8be4b (diff) | |
download | chromium_src-a0c91a9ffb1db127cf1f06e285b208a544ed4567.zip chromium_src-a0c91a9ffb1db127cf1f06e285b208a544ed4567.tar.gz chromium_src-a0c91a9ffb1db127cf1f06e285b208a544ed4567.tar.bz2 |
Drive extension functions from ExtensionFunction::Run. The
SyncExtensionFunction and AsyncExtensionFunction derivates now expose RunSync
and RunAsync respectively. New extension function implementations should just
implement Run directly.
BUG=365732
R=rockot@chromium.org
TBR=dmazzoni@chromium.org
Review URL: https://codereview.chromium.org/257333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/processes')
-rw-r--r-- | chrome/browser/extensions/api/processes/processes_api.cc | 12 | ||||
-rw-r--r-- | chrome/browser/extensions/api/processes/processes_api.h | 7 |
2 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc index 70bc204..d09cc5e 100644 --- a/chrome/browser/extensions/api/processes/processes_api.cc +++ b/chrome/browser/extensions/api/processes/processes_api.cc @@ -538,7 +538,7 @@ void ProcessesAPI::OnListenerRemoved(const EventListenerInfo& details) { GetProcessIdForTabFunction::GetProcessIdForTabFunction() : tab_id_(-1) { } -bool GetProcessIdForTabFunction::RunImpl() { +bool GetProcessIdForTabFunction::RunAsync() { #if defined(ENABLE_TASK_MANAGER) EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &tab_id_)); @@ -592,14 +592,14 @@ void GetProcessIdForTabFunction::GetProcessIdForTab() { SendResponse(true); } - // Balance the AddRef in the RunImpl. + // Balance the AddRef in the RunAsync. Release(); } TerminateFunction::TerminateFunction() : process_id_(-1) { } -bool TerminateFunction::RunImpl() { +bool TerminateFunction::RunAsync() { #if defined(ENABLE_TASK_MANAGER) EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &process_id_)); @@ -662,7 +662,7 @@ void TerminateFunction::TerminateProcess() { SendResponse(true); } - // Balance the AddRef in the RunImpl. + // Balance the AddRef in the RunAsync. Release(); #else error_ = errors::kExtensionNotSupported; @@ -680,7 +680,7 @@ GetProcessInfoFunction::GetProcessInfoFunction() GetProcessInfoFunction::~GetProcessInfoFunction() { } -bool GetProcessInfoFunction::RunImpl() { +bool GetProcessInfoFunction::RunAsync() { #if defined(ENABLE_TASK_MANAGER) base::Value* processes = NULL; @@ -763,7 +763,7 @@ void GetProcessInfoFunction::GatherProcessInfo() { SetResult(processes); SendResponse(true); - // Balance the AddRef in the RunImpl. + // Balance the AddRef in the RunAsync. Release(); #endif // defined(ENABLE_TASK_MANAGER) } diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h index 035a705a..dd89ca2 100644 --- a/chrome/browser/extensions/api/processes/processes_api.h +++ b/chrome/browser/extensions/api/processes/processes_api.h @@ -139,7 +139,7 @@ class GetProcessIdForTabFunction : public ChromeAsyncExtensionFunction { private: virtual ~GetProcessIdForTabFunction() {} - virtual bool RunImpl() OVERRIDE; + virtual bool RunAsync() OVERRIDE; void GetProcessIdForTab(); @@ -161,8 +161,7 @@ class TerminateFunction : public ChromeAsyncExtensionFunction { private: virtual ~TerminateFunction() {} - virtual bool RunImpl() OVERRIDE; - + virtual bool RunAsync() OVERRIDE; void TerminateProcess(); @@ -181,7 +180,7 @@ class GetProcessInfoFunction : public ChromeAsyncExtensionFunction { private: virtual ~GetProcessInfoFunction(); - virtual bool RunImpl() OVERRIDE; + virtual bool RunAsync() OVERRIDE; void GatherProcessInfo(); |