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

Unified Diff: extensions/common/extension_api.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: Fix various builds. 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: extensions/common/extension_api.cc
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index 1fee5b3c8b272719f2db9108d0288ec63655c8fc..8430a2fb117dead341b92dc8d8790f75196aeffc 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -132,8 +132,8 @@ void PrefixRefsWithNamespace(const std::string& schema_namespace,
base::ListValue* list = NULL;
base::DictionaryValue* dict = NULL;
if (value->GetAsList(&list)) {
- for (base::ListValue::iterator i = list->begin(); i != list->end(); ++i) {
- PrefixRefsWithNamespace(schema_namespace, *i);
+ for (const auto& i : *list) {
+ PrefixRefsWithNamespace(schema_namespace, i.get());
}
} else if (value->GetAsDictionary(&dict)) {
MaybePrefixFieldWithNamespace(schema_namespace, dict, "$ref");

Powered by Google App Engine
This is Rietveld 408576698