Index: chrome/browser/chromeos/extensions/first_run_private_api.cc |
diff --git a/chrome/browser/chromeos/extensions/first_run_private_api.cc b/chrome/browser/chromeos/extensions/first_run_private_api.cc |
index de98afb7efe6b76b533dab74191d6d4018781a01..2634c576b587cf6c67ee2ee5c842b170187fd720 100644 |
--- a/chrome/browser/chromeos/extensions/first_run_private_api.cc |
+++ b/chrome/browser/chromeos/extensions/first_run_private_api.cc |
@@ -19,12 +19,14 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/webui/web_ui_util.h" |
-bool FirstRunPrivateGetLocalizedStringsFunction::RunSync() { |
+ExtensionFunction::ResponseAction |
+FirstRunPrivateGetLocalizedStringsFunction::Run() { |
UMA_HISTOGRAM_COUNTS("CrosFirstRun.DialogShown", 1); |
std::unique_ptr<base::DictionaryValue> localized_strings( |
new base::DictionaryValue()); |
const user_manager::User* user = |
- chromeos::ProfileHelper::Get()->GetUserByProfile(GetProfile()); |
+ chromeos::ProfileHelper::Get()->GetUserByProfile( |
+ Profile::FromBrowserContext(browser_context())); |
if (!user->GetGivenName().empty()) { |
localized_strings->SetString( |
"greetingHeader", |
@@ -55,11 +57,10 @@ bool FirstRunPrivateGetLocalizedStringsFunction::RunSync() { |
const std::string& app_locale = g_browser_process->GetApplicationLocale(); |
webui::SetLoadTimeDataDefaults(app_locale, localized_strings.get()); |
- SetResult(std::move(localized_strings)); |
- return true; |
+ return RespondNow(OneArgument(std::move(localized_strings))); |
} |
-bool FirstRunPrivateLaunchTutorialFunction::RunSync() { |
+ExtensionFunction::ResponseAction FirstRunPrivateLaunchTutorialFunction::Run() { |
chromeos::first_run::LaunchTutorial(); |
- return true; |
+ return RespondNow(NoArguments()); |
} |