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

Unified Diff: chrome/browser/policy/managed_bookmarks_policy_handler.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 | « chrome/browser/plugins/plugin_prefs.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/managed_bookmarks_policy_handler.cc
diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler.cc b/chrome/browser/policy/managed_bookmarks_policy_handler.cc
index b112a0ccae13ec84808cf9216b52bec70aeea6ac..dd5fa8bec559ad4bb5e8cda9eaa41aad03e516ad 100644
--- a/chrome/browser/policy/managed_bookmarks_policy_handler.cc
+++ b/chrome/browser/policy/managed_bookmarks_policy_handler.cc
@@ -51,8 +51,7 @@
// Iterate over the list, and try to find the FolderName.
for (const auto& el : list) {
const base::DictionaryValue* dict = NULL;
- if (!el.GetAsDictionary(&dict))
- continue;
+ if (!el || !el->GetAsDictionary(&dict)) continue;
std::string name;
if (dict->GetString(ManagedBookmarksTracker::kFolderName, &name)) {
@@ -69,7 +68,7 @@
base::ListValue::iterator it = list->begin();
while (it != list->end()) {
base::DictionaryValue* dict = NULL;
- if (!it->GetAsDictionary(&dict)) {
+ if (!*it || !(*it)->GetAsDictionary(&dict)) {
it = list->Erase(it, NULL);
continue;
}
« no previous file with comments | « chrome/browser/plugins/plugin_prefs.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698