| Index: chrome/browser/chromeos/extensions/users_private/users_private_api.cc
|
| diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_api.cc b/chrome/browser/chromeos/extensions/users_private/users_private_api.cc
|
| index 0ca0a1bde918c3cbf7309ae52446f9f726765c3d..e5541c249b945fbb21ac9450f3102902bda66532 100644
|
| --- a/chrome/browser/chromeos/extensions/users_private/users_private_api.cc
|
| +++ b/chrome/browser/chromeos/extensions/users_private/users_private_api.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include <utility>
|
|
|
| +#include "base/bind.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/values.h"
|
| @@ -211,9 +212,15 @@ UsersPrivateIsCurrentUserOwnerFunction::
|
|
|
| ExtensionFunction::ResponseAction
|
| UsersPrivateIsCurrentUserOwnerFunction::Run() {
|
| - bool is_owner =
|
| - chromeos::ProfileHelper::IsOwnerProfile(chrome_details_.GetProfile());
|
| - return RespondNow(OneArgument(base::MakeUnique<base::Value>(is_owner)));
|
| + chromeos::OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(
|
| + browser_context())
|
| + ->IsOwnerAsync(base::Bind(
|
| + &UsersPrivateIsCurrentUserOwnerFunction::IsOwnerCallback, this));
|
| + return RespondLater();
|
| +}
|
| +
|
| +void UsersPrivateIsCurrentUserOwnerFunction::IsOwnerCallback(bool is_owner) {
|
| + Respond(OneArgument(base::MakeUnique<base::Value>(is_owner)));
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|