summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_model.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 03:59:42 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 03:59:42 +0000
commit85d911cd2f9cf2cb8235ff46560b5931ef5ab16e (patch)
treec8b776f8cd9f2d42f093ba02fc15e81b513532a6 /chrome/browser/bookmarks/bookmark_model.h
parentc12c168662aeed170eea3a9d401616c6db522ecb (diff)
downloadchromium_src-85d911cd2f9cf2cb8235ff46560b5931ef5ab16e.zip
chromium_src-85d911cd2f9cf2cb8235ff46560b5931ef5ab16e.tar.gz
chromium_src-85d911cd2f9cf2cb8235ff46560b5931ef5ab16e.tar.bz2
Adds an index over bookmark titles for fast look up.
The index is currently built on the main thread (because that's where we do the decoding now), but I'll change that after landing this. BUG=6646 TEST=There are tests to cover this, but make sure the omnibox still suggests bookmark titles. Review URL: http://codereview.chromium.org/115403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_model.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index f605dec..8552e26 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -14,8 +14,10 @@
#include "base/lock.h"
#include "base/observer_list.h"
#include "base/waitable_event.h"
+#include "chrome/browser/bookmarks/bookmark_index.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/bookmarks/bookmark_storage.h"
+#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_types.h"
@@ -309,6 +311,11 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
// combobox of most recently modified groups.
void ResetDateGroupModified(BookmarkNode* node);
+ void GetBookmarksWithTitlesMatching(
+ const std::wstring& text,
+ size_t max_count,
+ std::vector<bookmark_utils::TitleMatch>* matches);
+
Profile* profile() const { return profile_; }
// Sets the store to NULL, making it so the BookmarkModel does not persist
@@ -437,6 +444,8 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
// Reads/writes bookmarks to disk.
scoped_refptr<BookmarkStorage> store_;
+ BookmarkIndex index_;
+
base::WaitableEvent loaded_signal_;
DISALLOW_COPY_AND_ASSIGN(BookmarkModel);