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

Unified Diff: services/catalog/instance.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
« no previous file with comments | « services/catalog/entry.cc ('k') | sync/test/fake_server/fake_server_verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/instance.cc
diff --git a/services/catalog/instance.cc b/services/catalog/instance.cc
index 6673f35ab5eabd4928bde13bfad7cd187e1d2c2a..d90126646259f11c4fb207fd036f75430da0ba4a 100644
--- a/services/catalog/instance.cc
+++ b/services/catalog/instance.cc
@@ -145,9 +145,8 @@ void Instance::DeserializeCatalog() {
CHECK(catalog);
// TODO(sky): make this handle aliases.
// TODO(beng): implement this properly!
- for (auto it = catalog->begin(); it != catalog->end(); ++it) {
+ for (const auto& v : *catalog) {
const base::DictionaryValue* dictionary = nullptr;
- const base::Value* v = *it;
CHECK(v->GetAsDictionary(&dictionary));
std::unique_ptr<Entry> entry = Entry::Deserialize(*dictionary);
// TODO(beng): user catalog.
« no previous file with comments | « services/catalog/entry.cc ('k') | sync/test/fake_server/fake_server_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698