Index: chrome/browser/bookmarks/bookmark_index.h |
diff --git a/chrome/browser/bookmarks/bookmark_index.h b/chrome/browser/bookmarks/bookmark_index.h |
index 4027e14def711b865eb2c144c15a9d573043d61f..2ac74129aac60f77b57a22df52422e394351bb7b 100644 |
--- a/chrome/browser/bookmarks/bookmark_index.h |
+++ b/chrome/browser/bookmarks/bookmark_index.h |
@@ -12,17 +12,10 @@ |
#include "base/basictypes.h" |
#include "base/strings/string16.h" |
+class BookmarkClient; |
class BookmarkNode; |
struct BookmarkTitleMatch; |
-namespace content { |
-class BrowserContext; |
-} |
- |
-namespace history { |
-class URLDatabase; |
-} |
- |
namespace query_parser { |
class QueryNode; |
class QueryParser; |
@@ -37,7 +30,7 @@ class QueryParser; |
// BookmarkNodes that contain that string in their title. |
class BookmarkIndex { |
public: |
- explicit BookmarkIndex(content::BrowserContext* browser_context); |
+ explicit BookmarkIndex(); |
~BookmarkIndex(); |
// Invoked when a bookmark has been added to the model. |
@@ -47,10 +40,10 @@ class BookmarkIndex { |
void Remove(const BookmarkNode* node); |
// Returns up to |max_count| of bookmarks containing the text |query|. |
- void GetBookmarksWithTitlesMatching( |
- const base::string16& query, |
- size_t max_count, |
- std::vector<BookmarkTitleMatch>* results); |
+ void GetBookmarksWithTitlesMatching(BookmarkClient* client, |
+ const base::string16& query, |
+ size_t max_count, |
+ std::vector<BookmarkTitleMatch>* results); |
private: |
typedef std::set<const BookmarkNode*> NodeSet; |
@@ -66,17 +59,10 @@ class BookmarkIndex { |
// Extracts |matches.nodes| into NodeTypedCountPairs, sorts the pairs in |
// decreasing order of typed count, and then de-dupes the matches. |
- void SortMatches(const Matches& matches, |
+ void SortMatches(BookmarkClient* client, |
+ const Matches& matches, |
NodeTypedCountPairs* node_typed_counts) const; |
- // Extracts BookmarkNodes from |match| and retrieves typed counts for each |
- // node from the in-memory database. Inserts pairs containing the node and |
- // typed count into the vector |node_typed_counts|. |node_typed_counts| is |
- // sorted in decreasing order of typed count. |
- void ExtractBookmarkNodePairs(history::URLDatabase* url_db, |
- const Match& match, |
- NodeTypedCountPairs* node_typed_counts) const; |
- |
// Sort function for NodeTypedCountPairs. We sort in decreasing order of typed |
// count so that the best matches will always be added to the results. |
static bool NodeTypedCountPairSortFunc(const NodeTypedCountPair& a, |
@@ -130,8 +116,6 @@ class BookmarkIndex { |
Index index_; |
- content::BrowserContext* browser_context_; |
- |
DISALLOW_COPY_AND_ASSIGN(BookmarkIndex); |
}; |