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 14 matching lines...) Expand all Loading... |
25 #include "ui/base/models/tree_node_model.h" | 25 #include "ui/base/models/tree_node_model.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 BookmarkModel; | 32 class BookmarkModel; |
33 class BookmarkModelObserver; | 33 class BookmarkModelObserver; |
34 class BookmarkStorage; | 34 class BookmarkStorage; |
35 struct BookmarkTitleMatch; | 35 struct BookmarkMatch; |
36 class Profile; | 36 class Profile; |
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 } |
45 | 45 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 const std::vector<const BookmarkNode*>& ordered_nodes); | 390 const std::vector<const BookmarkNode*>& ordered_nodes); |
391 | 391 |
392 // Sets the date when the folder was modified. | 392 // Sets the date when the folder was modified. |
393 void SetDateFolderModified(const BookmarkNode* node, const base::Time time); | 393 void SetDateFolderModified(const BookmarkNode* node, const base::Time time); |
394 | 394 |
395 // Resets the 'date modified' time of the node to 0. This is used during | 395 // Resets the 'date modified' time of the node to 0. This is used during |
396 // importing to exclude the newly created folders from showing up in the | 396 // importing to exclude the newly created folders from showing up in the |
397 // combobox of most recently modified folders. | 397 // combobox of most recently modified folders. |
398 void ResetDateFolderModified(const BookmarkNode* node); | 398 void ResetDateFolderModified(const BookmarkNode* node); |
399 | 399 |
400 void GetBookmarksWithTitlesMatching( | 400 // Returns up to |max_count| of bookmarks containing each term from |text| |
| 401 // in either the title or the URL. |
| 402 void GetBookmarksMatching( |
401 const base::string16& text, | 403 const base::string16& text, |
402 size_t max_count, | 404 size_t max_count, |
403 std::vector<BookmarkTitleMatch>* matches); | 405 std::vector<BookmarkMatch>* matches); |
404 | 406 |
405 // Sets the store to NULL, making it so the BookmarkModel does not persist | 407 // Sets the store to NULL, making it so the BookmarkModel does not persist |
406 // any changes to disk. This is only useful during testing to speed up | 408 // any changes to disk. This is only useful during testing to speed up |
407 // testing. | 409 // testing. |
408 void ClearStore(); | 410 void ClearStore(); |
409 | 411 |
410 // Returns the next node ID. | 412 // Returns the next node ID. |
411 int64 next_node_id() const { return next_node_id_; } | 413 int64 next_node_id() const { return next_node_id_; } |
412 | 414 |
413 // Returns the object responsible for tracking the set of expanded nodes in | 415 // Returns the object responsible for tracking the set of expanded nodes in |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 574 |
573 // See description of IsDoingExtensiveChanges above. | 575 // See description of IsDoingExtensiveChanges above. |
574 int extensive_changes_; | 576 int extensive_changes_; |
575 | 577 |
576 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; | 578 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; |
577 | 579 |
578 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 580 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
579 }; | 581 }; |
580 | 582 |
581 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ | 583 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_H_ |
OLD | NEW |