| Index: chrome/browser/extensions/api/module/module.cc
|
| diff --git a/chrome/browser/extensions/api/module/module.cc b/chrome/browser/extensions/api/module/module.cc
|
| index 7bd4f26599a266f898690acd7780199d77206ca7..d98c2a05ad8a0712236b42b19a0dc0fb7d51d009 100644
|
| --- a/chrome/browser/extensions/api/module/module.cc
|
| +++ b/chrome/browser/extensions/api/module/module.cc
|
| @@ -37,29 +37,30 @@ std::string GetUpdateURLData(const ExtensionPrefs* prefs,
|
|
|
| } // namespace extension
|
|
|
| -bool ExtensionSetUpdateUrlDataFunction::RunSync() {
|
| +ExtensionFunction::ResponseAction ExtensionSetUpdateUrlDataFunction::Run() {
|
| std::string data;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
|
|
|
| if (ManifestURL::UpdatesFromGallery(extension())) {
|
| - return false;
|
| + return RespondNow(Error(kUnknownErrorDoNotUse));
|
| }
|
|
|
| - ExtensionPrefs::Get(GetProfile())->UpdateExtensionPref(
|
| - extension_id(), extension::kUpdateURLData, new base::StringValue(data));
|
| - return true;
|
| + ExtensionPrefs::Get(browser_context())
|
| + ->UpdateExtensionPref(extension_id(), extension::kUpdateURLData,
|
| + new base::StringValue(data));
|
| + return RespondNow(NoArguments());
|
| }
|
|
|
| -bool ExtensionIsAllowedIncognitoAccessFunction::RunSync() {
|
| - SetResult(base::MakeUnique<base::FundamentalValue>(
|
| - util::IsIncognitoEnabled(extension_id(), GetProfile())));
|
| - return true;
|
| +ExtensionFunction::ResponseAction
|
| +ExtensionIsAllowedIncognitoAccessFunction::Run() {
|
| + return RespondNow(OneArgument(base::MakeUnique<base::FundamentalValue>(
|
| + util::IsIncognitoEnabled(extension_id(), browser_context()))));
|
| }
|
|
|
| -bool ExtensionIsAllowedFileSchemeAccessFunction::RunSync() {
|
| - SetResult(base::MakeUnique<base::FundamentalValue>(
|
| - util::AllowFileAccess(extension_id(), GetProfile())));
|
| - return true;
|
| +ExtensionFunction::ResponseAction
|
| +ExtensionIsAllowedFileSchemeAccessFunction::Run() {
|
| + return RespondNow(OneArgument(base::MakeUnique<base::FundamentalValue>(
|
| + util::AllowFileAccess(extension_id(), browser_context()))));
|
| }
|
|
|
| } // namespace extensions
|
|
|