OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
26 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
27 #include "url/gurl.h" | 27 #include "url/gurl.h" |
28 | 28 |
29 class BookmarkExpandedStateTracker; | 29 class BookmarkExpandedStateTracker; |
30 class BookmarkIndex; | 30 class BookmarkIndex; |
31 class BookmarkLoadDetails; | 31 class BookmarkLoadDetails; |
32 class BookmarkModelObserver; | 32 class BookmarkModelObserver; |
33 class BookmarkStorage; | 33 class BookmarkStorage; |
34 struct BookmarkTitleMatch; | 34 struct BookmarkMatch; |
35 class Profile; | 35 class Profile; |
36 class ScopedGroupBookmarkActions; | 36 class ScopedGroupBookmarkActions; |
37 | 37 |
38 namespace base { | 38 namespace base { |
39 class SequencedTaskRunner; | 39 class SequencedTaskRunner; |
40 } | 40 } |
41 | 41 |
42 namespace chrome { | 42 namespace chrome { |
43 struct FaviconImageResult; | 43 struct FaviconImageResult; |
44 } | 44 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 const std::vector<const BookmarkNode*>& ordered_nodes); | 205 const std::vector<const BookmarkNode*>& ordered_nodes); |
206 | 206 |
207 // Sets the date when the folder was modified. | 207 // Sets the date when the folder was modified. |
208 void SetDateFolderModified(const BookmarkNode* node, const base::Time time); | 208 void SetDateFolderModified(const BookmarkNode* node, const base::Time time); |
209 | 209 |
210 // Resets the 'date modified' time of the node to 0. This is used during | 210 // Resets the 'date modified' time of the node to 0. This is used during |
211 // importing to exclude the newly created folders from showing up in the | 211 // importing to exclude the newly created folders from showing up in the |
212 // combobox of most recently modified folders. | 212 // combobox of most recently modified folders. |
213 void ResetDateFolderModified(const BookmarkNode* node); | 213 void ResetDateFolderModified(const BookmarkNode* node); |
214 | 214 |
215 void GetBookmarksWithTitlesMatching( | 215 // Returns up to |max_count| of bookmarks containing each term from |text| |
| 216 // in either the title or the URL. |
| 217 void GetBookmarksMatching( |
216 const base::string16& text, | 218 const base::string16& text, |
217 size_t max_count, | 219 size_t max_count, |
218 std::vector<BookmarkTitleMatch>* matches); | 220 std::vector<BookmarkMatch>* matches); |
219 | 221 |
220 // Sets the store to NULL, making it so the BookmarkModel does not persist | 222 // Sets the store to NULL, making it so the BookmarkModel does not persist |
221 // any changes to disk. This is only useful during testing to speed up | 223 // any changes to disk. This is only useful during testing to speed up |
222 // testing. | 224 // testing. |
223 void ClearStore(); | 225 void ClearStore(); |
224 | 226 |
225 // Returns the next node ID. | 227 // Returns the next node ID. |
226 int64 next_node_id() const { return next_node_id_; } | 228 int64 next_node_id() const { return next_node_id_; } |
227 | 229 |
228 // Returns the object responsible for tracking the set of expanded nodes in | 230 // Returns the object responsible for tracking the set of expanded nodes in |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 395 |
394 // See description of IsDoingExtensiveChanges above. | 396 // See description of IsDoingExtensiveChanges above. |
395 int extensive_changes_; | 397 int extensive_changes_; |
396 | 398 |
397 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 399 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
398 | 400 |
399 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 401 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
400 }; | 402 }; |
401 | 403 |
402 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 404 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
OLD | NEW |