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

Unified Diff: components/signin/core/browser/about_signin_internals.cc

Issue 2287733002: Switch //components away from base::ListValue::Append(Value*) overload. (Closed)
Patch Set: Test fix Created 4 years, 4 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: components/signin/core/browser/about_signin_internals.cc
diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc
index 2ed39cd6ae9fc60129970106f30fba622b572d33..b6b897b63250ebc437b0896473cd51dfdfb392d1 100644
--- a/components/signin/core/browser/about_signin_internals.cc
+++ b/components/signin/core/browser/about_signin_internals.cc
@@ -429,7 +429,8 @@ bool AboutSigninInternals::TokenInfo::LessThan(const TokenInfo* a,
void AboutSigninInternals::TokenInfo::Invalidate() { removed_ = true; }
-base::DictionaryValue* AboutSigninInternals::TokenInfo::ToValue() const {
+std::unique_ptr<base::DictionaryValue>
+AboutSigninInternals::TokenInfo::ToValue() const {
std::unique_ptr<base::DictionaryValue> token_info(
new base::DictionaryValue());
token_info->SetString("service", consumer_id);
@@ -471,7 +472,7 @@ base::DictionaryValue* AboutSigninInternals::TokenInfo::ToValue() const {
token_info->SetString("status", "Waiting for response");
}
- return token_info.release();
+ return token_info;
}
AboutSigninInternals::SigninStatus::SigninStatus()
@@ -653,8 +654,7 @@ AboutSigninInternals::SigninStatus::ToValue(
"422460 AboutSigninInternals::SigninStatus::ToValue43"));
for (size_t i = 0; i < tokens.size(); ++i) {
- base::DictionaryValue* token_info = tokens[i]->ToValue();
- token_details->Append(token_info);
+ token_details->Append(tokens[i]->ToValue());
}
}

Powered by Google App Engine
This is Rietveld 408576698