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

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: Edited comments. 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
@@ -175,16 +179,17 @@
public:
// Different AutocompleteProvider implementations.
enum Type {
- TYPE_BUILTIN = 1 << 0,
- TYPE_CONTACT = 1 << 1,
- TYPE_EXTENSION_APP = 1 << 2,
- TYPE_HISTORY_CONTENTS = 1 << 3,
- TYPE_HISTORY_QUICK = 1 << 4,
- TYPE_HISTORY_URL = 1 << 5,
- TYPE_KEYWORD = 1 << 6,
- TYPE_SEARCH = 1 << 7,
- TYPE_SHORTCUTS = 1 << 8,
- TYPE_ZERO_SUGGEST = 1 << 9,
+ TYPE_BOOKMARK = 1 << 0,
+ TYPE_BUILTIN = 1 << 1,
+ TYPE_CONTACT = 1 << 2,
+ TYPE_EXTENSION_APP = 1 << 3,
+ TYPE_HISTORY_CONTENTS = 1 << 4,
+ TYPE_HISTORY_QUICK = 1 << 5,
+ TYPE_HISTORY_URL = 1 << 6,
+ TYPE_KEYWORD = 1 << 7,
+ TYPE_SEARCH = 1 << 8,
+ TYPE_SHORTCUTS = 1 << 9,
+ TYPE_ZERO_SUGGEST = 1 << 10,
};
AutocompleteProvider(AutocompleteProviderListener* listener,

Powered by Google App Engine
This is Rietveld 408576698