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

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

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes 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_apitest.cc
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc
index ef6ce09458de7f80e7b63c5fc7116b9604f99396..fa961689ac2d281dec2468aef89b96e105e6fe3a 100644
--- a/chrome/browser/extensions/api/identity/identity_apitest.cc
+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc
@@ -490,15 +490,13 @@ class IdentityGetAccountsFunctionTest : public ExtensionBrowserTest {
if (!results) {
msg << "NULL";
} else {
- for (base::ListValue::const_iterator it = results->begin();
- it != results->end();
- ++it) {
+ for (const auto& result : *results) {
std::unique_ptr<api::identity::AccountInfo> info =
- api::identity::AccountInfo::FromValue(**it);
+ api::identity::AccountInfo::FromValue(*result);
if (info.get())
msg << info->id << " ";
else
- msg << *it << "<-" << (*it)->GetType() << " ";
+ msg << *result << "<-" << result->GetType() << " ";
}
}

Powered by Google App Engine
This is Rietveld 408576698