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

Unified Diff: extensions/browser/api/test/test_api.cc

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bookmarks Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/test/test_api.h ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/test/test_api.cc
diff --git a/extensions/browser/api/test/test_api.cc b/extensions/browser/api/test/test_api.cc
index d4ccc5c033bdecbc4473fbebd2be3a6fcecabd83..b0529465e265dc94d5ebdac6bebf2d4858c852b5 100644
--- a/extensions/browser/api/test/test_api.cc
+++ b/extensions/browser/api/test/test_api.cc
@@ -38,18 +38,17 @@ namespace WaitForRoundTrip = core_api::test::WaitForRoundTrip;
TestExtensionFunction::~TestExtensionFunction() {}
-void TestExtensionFunction::Run() {
+bool TestExtensionFunction::RunSync() {
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
error_ = kNotTestProcessError;
- SendResponse(false);
- return;
+ return false;
}
- SendResponse(RunImpl());
+ return RunSafe();
}
TestNotifyPassFunction::~TestNotifyPassFunction() {}
-bool TestNotifyPassFunction::RunImpl() {
+bool TestNotifyPassFunction::RunSafe() {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
content::Source<content::BrowserContext>(dispatcher()->browser_context()),
@@ -59,7 +58,7 @@ bool TestNotifyPassFunction::RunImpl() {
TestNotifyFailFunction::~TestNotifyFailFunction() {}
-bool TestNotifyFailFunction::RunImpl() {
+bool TestNotifyFailFunction::RunSafe() {
scoped_ptr<NotifyFail::Params> params(NotifyFail::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
content::NotificationService::current()->Notify(
@@ -71,7 +70,7 @@ bool TestNotifyFailFunction::RunImpl() {
TestLogFunction::~TestLogFunction() {}
-bool TestLogFunction::RunImpl() {
+bool TestLogFunction::RunSafe() {
scoped_ptr<Log::Params> params(Log::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
VLOG(1) << params->message;
@@ -80,7 +79,7 @@ bool TestLogFunction::RunImpl() {
TestResetQuotaFunction::~TestResetQuotaFunction() {}
-bool TestResetQuotaFunction::RunImpl() {
+bool TestResetQuotaFunction::RunSafe() {
QuotaService* quota =
ExtensionSystem::Get(browser_context())->quota_service();
quota->Purge();
@@ -123,7 +122,7 @@ TestGetConfigFunction::TestConfigState::GetInstance() {
TestGetConfigFunction::~TestGetConfigFunction() {}
-bool TestGetConfigFunction::RunImpl() {
+bool TestGetConfigFunction::RunSafe() {
TestConfigState* test_config_state = TestConfigState::GetInstance();
if (!test_config_state->config_state()) {
@@ -137,7 +136,7 @@ bool TestGetConfigFunction::RunImpl() {
TestWaitForRoundTripFunction::~TestWaitForRoundTripFunction() {}
-bool TestWaitForRoundTripFunction::RunImpl() {
+bool TestWaitForRoundTripFunction::RunSafe() {
scoped_ptr<WaitForRoundTrip::Params> params(
WaitForRoundTrip::Params::Create(*args_));
SetResult(new base::StringValue(params->message));
« no previous file with comments | « extensions/browser/api/test/test_api.h ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698