| Index: chrome/browser/extensions/api/identity/identity_api.cc
|
| diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc
|
| index f018e140609a15b79d3888da79f49d909c447966..853fb7c5d254b885e01a3900003b7c3f9783ef99 100644
|
| --- a/chrome/browser/extensions/api/identity/identity_api.cc
|
| +++ b/chrome/browser/extensions/api/identity/identity_api.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <stddef.h>
|
|
|
| +#include <memory>
|
| #include <set>
|
| #include <string>
|
| #include <utility>
|
| @@ -292,7 +293,7 @@ ExtensionFunction::ResponseAction IdentityGetAccountsFunction::Run() {
|
| IdentityAPI::GetFactoryInstance()->Get(GetProfile())->GetAccounts();
|
| DCHECK(gaia_ids.size() < 2 || switches::IsExtensionsMultiAccount());
|
|
|
| - base::ListValue* infos = new base::ListValue();
|
| + std::unique_ptr<base::ListValue> infos(new base::ListValue());
|
|
|
| for (std::vector<std::string>::const_iterator it = gaia_ids.begin();
|
| it != gaia_ids.end();
|
| @@ -302,7 +303,7 @@ ExtensionFunction::ResponseAction IdentityGetAccountsFunction::Run() {
|
| infos->Append(account_info.ToValue().release());
|
| }
|
|
|
| - return RespondNow(OneArgument(infos));
|
| + return RespondNow(OneArgument(std::move(infos)));
|
| }
|
|
|
| IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction()
|
| @@ -917,7 +918,7 @@ ExtensionFunction::ResponseAction IdentityGetProfileUserInfoFunction::Run() {
|
| profile_user_info.id = account.gaia;
|
| }
|
|
|
| - return RespondNow(OneArgument(profile_user_info.ToValue().release()));
|
| + return RespondNow(OneArgument(profile_user_info.ToValue()));
|
| }
|
|
|
| IdentityRemoveCachedAuthTokenFunction::IdentityRemoveCachedAuthTokenFunction() {
|
|
|