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

Unified Diff: chrome/browser/extensions/api/commands/commands.cc

Issue 2298493003: [Extensions] Convert some ChromeSyncExtensionFunctions (Closed)
Patch Set: fix Created 4 years, 4 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
Index: chrome/browser/extensions/api/commands/commands.cc
diff --git a/chrome/browser/extensions/api/commands/commands.cc b/chrome/browser/extensions/api/commands/commands.cc
index 64c03e8e295df310cc0e3c7771b7d21725e184e4..eec31c29424e2eb62585ccbd9deea7beee3006ab 100644
--- a/chrome/browser/extensions/api/commands/commands.cc
+++ b/chrome/browser/extensions/api/commands/commands.cc
@@ -25,11 +25,11 @@ base::DictionaryValue* CreateCommandValue(
} // namespace
-bool GetAllCommandsFunction::RunSync() {
+ExtensionFunction::ResponseAction GetAllCommandsFunction::Run() {
std::unique_ptr<base::ListValue> command_list(new base::ListValue());
extensions::CommandService* command_service =
- extensions::CommandService::Get(GetProfile());
+ extensions::CommandService::Get(browser_context());
extensions::Command browser_action;
bool active = false;
@@ -64,6 +64,5 @@ bool GetAllCommandsFunction::RunSync() {
command_list->Append(CreateCommandValue(iter->second, active));
}
- SetResult(std::move(command_list));
- return true;
+ return RespondNow(OneArgument(std::move(command_list)));
}

Powered by Google App Engine
This is Rietveld 408576698