| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/bookmarks/core/browser/bookmark_utils.h" | 5 #include "components/bookmarks/browser/bookmark_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/i18n/case_conversion.h" | 11 #include "base/i18n/case_conversion.h" |
| 12 #include "base/i18n/string_search.h" | 12 #include "base/i18n/string_search.h" |
| 13 #include "base/metrics/user_metrics_action.h" | 13 #include "base/metrics/user_metrics_action.h" |
| 14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "components/bookmarks/core/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
| 18 #include "components/bookmarks/core/browser/scoped_group_bookmark_actions.h" | 18 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" |
| 19 #include "components/bookmarks/core/common/bookmark_pref_names.h" | 19 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 20 #include "components/pref_registry/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.h" |
| 21 #include "components/query_parser/query_parser.h" | 21 #include "components/query_parser/query_parser.h" |
| 22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
| 23 #include "ui/base/models/tree_node_iterator.h" | 23 #include "ui/base/models/tree_node_iterator.h" |
| 24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 using base::Time; | 26 using base::Time; |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 base::string16 CleanUpTitleForMatching(const base::string16& title) { | 414 base::string16 CleanUpTitleForMatching(const base::string16& title) { |
| 415 return base::i18n::ToLower(title.substr(0u, kCleanedUpTitleMaxLength)); | 415 return base::i18n::ToLower(title.substr(0u, kCleanedUpTitleMaxLength)); |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace bookmark_utils | 418 } // namespace bookmark_utils |
| 419 | 419 |
| 420 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) { | 420 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) { |
| 421 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate. | 421 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate. |
| 422 return GetNodeByID(model->root_node(), id); | 422 return GetNodeByID(model->root_node(), id); |
| 423 } | 423 } |
| OLD | NEW |