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/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "components/bookmarks/core/browser/bookmark_model.h" | 18 #include "components/bookmarks/browser/bookmark_model.h" |
19 #include "components/bookmarks/core/browser/scoped_group_bookmark_actions.h" | 19 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" |
20 #include "components/bookmarks/core/common/bookmark_pref_names.h" | 20 #include "components/bookmarks/common/bookmark_pref_names.h" |
21 #include "components/query_parser/query_parser.h" | 21 #include "components/query_parser/query_parser.h" |
22 #include "components/user_prefs/pref_registry_syncable.h" | 22 #include "components/user_prefs/pref_registry_syncable.h" |
23 #include "net/base/net_util.h" | 23 #include "net/base/net_util.h" |
24 #include "ui/base/models/tree_node_iterator.h" | 24 #include "ui/base/models/tree_node_iterator.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 using base::Time; | 27 using base::Time; |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 base::string16 CleanUpTitleForMatching(const base::string16& title) { | 415 base::string16 CleanUpTitleForMatching(const base::string16& title) { |
416 return base::i18n::ToLower(title.substr(0u, kCleanedUpTitleMaxLength)); | 416 return base::i18n::ToLower(title.substr(0u, kCleanedUpTitleMaxLength)); |
417 } | 417 } |
418 | 418 |
419 } // namespace bookmark_utils | 419 } // namespace bookmark_utils |
420 | 420 |
421 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) { | 421 const BookmarkNode* GetBookmarkNodeByID(const BookmarkModel* model, int64 id) { |
422 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate. | 422 // TODO(sky): TreeNode needs a method that visits all nodes using a predicate. |
423 return GetNodeByID(model->root_node(), id); | 423 return GetNodeByID(model->root_node(), id); |
424 } | 424 } |
OLD | NEW |