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

Unified Diff: chrome/browser/policy/managed_bookmarks_policy_handler.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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: 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 dd5fa8bec559ad4bb5e8cda9eaa41aad03e516ad..b112a0ccae13ec84808cf9216b52bec70aeea6ac 100644
--- a/chrome/browser/policy/managed_bookmarks_policy_handler.cc
+++ b/chrome/browser/policy/managed_bookmarks_policy_handler.cc
@@ -51,7 +51,8 @@ ManagedBookmarksPolicyHandler::GetFolderName(const base::ListValue& list) {
// Iterate over the list, and try to find the FolderName.
for (const auto& el : list) {
const base::DictionaryValue* dict = NULL;
- if (!el || !el->GetAsDictionary(&dict)) continue;
+ if (!el.GetAsDictionary(&dict))
+ continue;
std::string name;
if (dict->GetString(ManagedBookmarksTracker::kFolderName, &name)) {
@@ -68,7 +69,7 @@ void ManagedBookmarksPolicyHandler::FilterBookmarks(base::ListValue* list) {
base::ListValue::iterator it = list->begin();
while (it != list->end()) {
base::DictionaryValue* dict = NULL;
- if (!*it || !(*it)->GetAsDictionary(&dict)) {
+ if (!it->GetAsDictionary(&dict)) {
it = list->Erase(it, NULL);
continue;
}

Powered by Google App Engine
This is Rietveld 408576698