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

Unified Diff: components/policy/core/common/schema.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 | « components/policy/core/common/registry_dict.cc ('k') | components/prefs/pref_member.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/schema.cc
diff --git a/components/policy/core/common/schema.cc b/components/policy/core/common/schema.cc
index 31dae8e6daa8faa21de5c85cdecebb8d1f27c3cd..330848cc732364817b5ed9558703a7083a0a4be6 100644
--- a/components/policy/core/common/schema.cc
+++ b/components/policy/core/common/schema.cc
@@ -619,7 +619,7 @@
int value;
for (base::ListValue::const_iterator it = possible_values->begin();
it != possible_values->end(); ++it) {
- if (!it->GetAsInteger(&value)) {
+ if (!(*it)->GetAsInteger(&value)) {
*error = "Invalid enumeration member type";
return false;
}
@@ -631,7 +631,7 @@
std::string value;
for (base::ListValue::const_iterator it = possible_values->begin();
it != possible_values->end(); ++it) {
- if (!it->GetAsString(&value)) {
+ if (!(*it)->GetAsString(&value)) {
*error = "Invalid enumeration member type";
return false;
}
@@ -826,7 +826,10 @@
} else if (value.GetAsList(&list)) {
for (base::ListValue::const_iterator it = list->begin(); it != list->end();
++it) {
- if (!GetItems().Validate(*it, StrategyForNextLevel(strategy), error_path,
+ if (!*it ||
+ !GetItems().Validate(**it,
+ StrategyForNextLevel(strategy),
+ error_path,
error)) {
// Invalid list item was detected.
AddListIndexPrefixToPath(it - list->begin(), error_path);
« no previous file with comments | « components/policy/core/common/registry_dict.cc ('k') | components/prefs/pref_member.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698