Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: chrome/browser/bookmarks/bookmark_model.h

Issue 184663002: Omnibox: Make URLs of Bookmarks Searchable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ALL_MATCHES (in response to recent changes) Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_index_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model.h
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index b6dfd70b8a686ff717d27f8dce654b201fe2b273..816b89b627113e8062d997948e92060e6f814f54 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -32,7 +32,7 @@ class BookmarkIndex;
class BookmarkLoadDetails;
class BookmarkModelObserver;
class BookmarkStorage;
-struct BookmarkTitleMatch;
+struct BookmarkMatch;
class Profile;
class ScopedGroupBookmarkActions;
@@ -58,7 +58,9 @@ class BookmarkModel : public content::NotificationObserver,
public BookmarkService,
public KeyedService {
public:
- explicit BookmarkModel(Profile* profile);
+ // |index_urls| says whether URLs should be stored in the BookmarkIndex
+ // in addition to bookmark titles.
+ BookmarkModel(Profile* profile, bool index_urls);
virtual ~BookmarkModel();
// Invoked prior to destruction to release any necessary resources.
@@ -210,10 +212,12 @@ class BookmarkModel : public content::NotificationObserver,
// combobox of most recently modified folders.
void ResetDateFolderModified(const BookmarkNode* node);
- void GetBookmarksWithTitlesMatching(
+ // Returns up to |max_count| of bookmarks containing each term from |text|
+ // in either the title or the URL.
+ void GetBookmarksMatching(
const base::string16& text,
size_t max_count,
- std::vector<BookmarkTitleMatch>* matches);
+ std::vector<BookmarkMatch>* matches);
// Sets the store to NULL, making it so the BookmarkModel does not persist
// any changes to disk. This is only useful during testing to speed up
@@ -385,6 +389,10 @@ class BookmarkModel : public content::NotificationObserver,
scoped_ptr<BookmarkIndex> index_;
+ // True if URLs are stored in the BookmarkIndex in addition to bookmark
+ // titles.
+ const bool index_urls_;
+
base::WaitableEvent loaded_signal_;
// See description of IsDoingExtensiveChanges above.
« no previous file with comments | « chrome/browser/bookmarks/bookmark_index_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698