| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // Returns the most recently added bookmarks. This does not return groups, | 125 // Returns the most recently added bookmarks. This does not return groups, |
| 126 // only nodes of type url. | 126 // only nodes of type url. |
| 127 void GetMostRecentlyAddedEntries(BookmarkModel* model, | 127 void GetMostRecentlyAddedEntries(BookmarkModel* model, |
| 128 size_t count, | 128 size_t count, |
| 129 std::vector<const BookmarkNode*>* nodes); | 129 std::vector<const BookmarkNode*>* nodes); |
| 130 | 130 |
| 131 // Used by GetBookmarksMatchingText to return a matching node and the location | 131 // Used by GetBookmarksMatchingText to return a matching node and the location |
| 132 // of the match in the title. | 132 // of the match in the title. |
| 133 struct TitleMatch { | 133 struct TitleMatch { |
| 134 TitleMatch(); |
| 135 ~TitleMatch(); |
| 136 |
| 134 const BookmarkNode* node; | 137 const BookmarkNode* node; |
| 135 | 138 |
| 136 // Location of the matching words in the title of the node. | 139 // Location of the matching words in the title of the node. |
| 137 Snippet::MatchPositions match_positions; | 140 Snippet::MatchPositions match_positions; |
| 138 }; | 141 }; |
| 139 | 142 |
| 140 // Returns true if |n1| was added more recently than |n2|. | 143 // Returns true if |n1| was added more recently than |n2|. |
| 141 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2); | 144 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2); |
| 142 | 145 |
| 143 // Returns up to |max_count| bookmarks from |model| whose url or title contains | 146 // Returns up to |max_count| bookmarks from |model| whose url or title contains |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // Number of bookmarks we'll open before prompting the user to see if they | 213 // Number of bookmarks we'll open before prompting the user to see if they |
| 211 // really want to open all. | 214 // really want to open all. |
| 212 // | 215 // |
| 213 // NOTE: treat this as a const. It is not const as various tests change the | 216 // NOTE: treat this as a const. It is not const as various tests change the |
| 214 // value. | 217 // value. |
| 215 extern int num_urls_before_prompting; | 218 extern int num_urls_before_prompting; |
| 216 | 219 |
| 217 } // namespace bookmark_utils | 220 } // namespace bookmark_utils |
| 218 | 221 |
| 219 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 222 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| OLD | NEW |