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

Unified Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 90153003: Remove unused bookmark model helper function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model.cc
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 6f66bdc8beaf61188225a71c2917f20998136153..b44ee90cb96f7ac1023b9c5d013faaf928693322 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -13,7 +13,6 @@
#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h"
#include "chrome/browser/bookmarks/bookmark_index.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
@@ -44,25 +43,6 @@ BookmarkNode* AsMutable(const BookmarkNode* node) {
return const_cast<BookmarkNode*>(node);
}
-// Helper to recursively determine if a Dictionary has any valid values.
-bool HasValues(const base::DictionaryValue& root) {
- if (root.empty())
- return false;
- for (base::DictionaryValue::Iterator iter(root); !iter.IsAtEnd();
- iter.Advance()) {
- const base::Value& value = iter.value();
- if (value.IsType(base::Value::TYPE_DICTIONARY)) {
- const base::DictionaryValue* dict_value = NULL;
- if (value.GetAsDictionary(&dict_value) && HasValues(*dict_value))
- return true;
- } else {
- // A non dictionary type was encountered, assume it's a valid value.
- return true;
- }
- }
- return false;
-}
-
// Whitespace characters to strip from bookmark titles.
const char16 kInvalidChars[] = {
'\n', '\r', '\t',
@@ -152,7 +132,6 @@ const BookmarkNode::MetaInfoMap* BookmarkNode::GetMetaInfoMap() const {
return meta_info_map_.get();
}
-
void BookmarkNode::Initialize(int64 id) {
id_ = id;
type_ = url_.is_empty() ? FOLDER : URL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698