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

Unified Diff: chrome/browser/history/url_index_private_data.h

Issue 10909046: Boost HQP Scores for Bookmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Simplification. Created 8 years, 3 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
Index: chrome/browser/history/url_index_private_data.h
===================================================================
--- chrome/browser/history/url_index_private_data.h (revision 154855)
+++ chrome/browser/history/url_index_private_data.h (working copy)
@@ -17,6 +17,7 @@
#include "content/public/browser/notification_details.h"
class HistoryQuickProviderTest;
+class BookmarkService;
namespace in_memory_url_index {
class InMemoryURLIndexCacheItem;
@@ -59,8 +60,10 @@
// will be found in nearly all history candidates. Results are sorted by
// descending score. The full results set (i.e. beyond the
// |kItemsToScoreLimit| limit) will be retained and used for subsequent calls
- // to this function.
- ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string);
+ // to this function. |bookmark_service| is used to boost a result's score if
+ // its URL is referenced by one or more of the user's bookmarks.
+ ScoredHistoryMatches HistoryItemsForTerms(const string16& term_string,
+ BookmarkService* bookmark_service);
// Adds the history item in |row| to the index if it does not already already
// exist and it meets the minimum 'quick' criteria. If the row already exists
@@ -165,6 +168,7 @@
class AddHistoryMatch : public std::unary_function<HistoryID, void> {
public:
AddHistoryMatch(const URLIndexPrivateData& private_data,
+ BookmarkService* bookmark_service,
const string16& lower_string,
const String16Vector& lower_terms,
const base::Time now);
@@ -176,6 +180,7 @@
private:
const URLIndexPrivateData& private_data_;
+ BookmarkService* bookmark_service_;
ScoredHistoryMatches scored_matches_;
const string16& lower_string_;
const String16Vector& lower_terms_;

Powered by Google App Engine
This is Rietveld 408576698