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

Unified Diff: chrome/browser/autocomplete/autocomplete_provider.h

Issue 10913262: Implement Bookmark Autocomplete Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address clint complaints. Created 8 years, 2 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/autocomplete/autocomplete_provider.h
===================================================================
--- chrome/browser/autocomplete/autocomplete_provider.h (revision 159706)
+++ chrome/browser/autocomplete/autocomplete_provider.h (working copy)
@@ -50,6 +50,7 @@
// Search Primary Provider (past query in history older than 2 days) | 1050--
// HistoryContents (any match in title of starred page) | 1000++
// HistoryURL (some inexact matches) | 900++
+// BookmarkProvider (prefix match in bookmark title) | 900+-
// Search Primary Provider (navigational suggestion) | 800++
// HistoryContents (any match in title of nonstarred page) | 700++
// Search Primary Provider (suggestion) | 600++
@@ -121,6 +122,7 @@
// Search Primary Provider (past query in history older than 2 days) | 1050--
// HistoryContents (any match in title of starred page) | 1000++
// HistoryURL (inexact match) | 900++
+// BookmarkProvider (prefix match in bookmark title) | 900+-
// Search Primary Provider (navigational suggestion) | 800++
// HistoryContents (any match in title of nonstarred page) | 700++
// Search Primary Provider (suggestion) | 600++
@@ -166,6 +168,8 @@
// *~: Partial matches get a score on a sliding scale from about 575-1125 based
// on how many times the URL for the Extension App has been typed and how
// many of the letters match.
+// +-: A base score that the provider will adjust upward or downward based on
+// provider-specific metrics.
//
// A single result provider for the autocomplete system. Given user input, the
// provider decides what (if any) matches to return, their relevance, and their
@@ -185,6 +189,7 @@
TYPE_SEARCH = 1 << 7,
TYPE_SHORTCUTS = 1 << 8,
TYPE_ZERO_SUGGEST = 1 << 9,
+ TYPE_BOOKMARK = 1 << 10,
Peter Kasting 2012/10/04 20:40:31 Nit: Can we keep these in alphabetical order?
mrossetti 2012/10/05 22:10:04 Sure. Done.
};
AutocompleteProvider(AutocompleteProviderListener* listener,

Powered by Google App Engine
This is Rietveld 408576698