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

Unified Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 2038613003: Revert of ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/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 853fb7c5d254b885e01a3900003b7c3f9783ef99..f018e140609a15b79d3888da79f49d909c447966 100644
--- a/chrome/browser/extensions/api/identity/identity_api.cc
+++ b/chrome/browser/extensions/api/identity/identity_api.cc
@@ -6,7 +6,6 @@
#include <stddef.h>
-#include <memory>
#include <set>
#include <string>
#include <utility>
@@ -293,7 +292,7 @@
IdentityAPI::GetFactoryInstance()->Get(GetProfile())->GetAccounts();
DCHECK(gaia_ids.size() < 2 || switches::IsExtensionsMultiAccount());
- std::unique_ptr<base::ListValue> infos(new base::ListValue());
+ base::ListValue* infos = new base::ListValue();
for (std::vector<std::string>::const_iterator it = gaia_ids.begin();
it != gaia_ids.end();
@@ -303,7 +302,7 @@
infos->Append(account_info.ToValue().release());
}
- return RespondNow(OneArgument(std::move(infos)));
+ return RespondNow(OneArgument(infos));
}
IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction()
@@ -918,7 +917,7 @@
profile_user_info.id = account.gaia;
}
- return RespondNow(OneArgument(profile_user_info.ToValue()));
+ return RespondNow(OneArgument(profile_user_info.ToValue().release()));
}
IdentityRemoveCachedAuthTokenFunction::IdentityRemoveCachedAuthTokenFunction() {

Powered by Google App Engine
This is Rietveld 408576698