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

Unified Diff: chromeos/network/onc/onc_validator.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: chromeos/network/onc/onc_validator.cc
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc
index b3a25b79f03d6dc558f8496142793995e7eff931..a6189e8eccbe75c2205446a9ffb417a52be8b0e1 100644
--- a/chromeos/network/onc/onc_validator.cc
+++ b/chromeos/network/onc/onc_validator.cc
@@ -258,7 +258,7 @@ bool Validator::ValidateRecommendedField(
}
std::unique_ptr<base::ListValue> repaired_recommended(new base::ListValue);
- for (const base::Value* entry : *recommended_list) {
+ for (const auto& entry : *recommended_list) {
std::string field_name;
if (!entry->GetAsString(&field_name)) {
NOTREACHED(); // The types of field values are already verified.
@@ -418,7 +418,7 @@ bool Validator::ListFieldContainsValidValues(
const base::ListValue* list = NULL;
if (object.GetListWithoutPathExpansion(field_name, &list)) {
path_.push_back(field_name);
- for (const base::Value* entry : *list) {
+ for (const auto& entry : *list) {
std::string value;
if (!entry->GetAsString(&value)) {
NOTREACHED(); // The types of field values are already verified.

Powered by Google App Engine
This is Rietveld 408576698