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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 // IMPORTANT CAVEAT: The tables below are NOT COMPLETE. Developers 29 // IMPORTANT CAVEAT: The tables below are NOT COMPLETE. Developers
30 // often forget to keep these tables in sync with the code when they 30 // often forget to keep these tables in sync with the code when they
31 // change scoring algorithms or add new providers. For example, 31 // change scoring algorithms or add new providers. For example,
32 // neither the HistoryQuickProvider (which is a provider that appears 32 // neither the HistoryQuickProvider (which is a provider that appears
33 // often) nor the ShortcutsProvider are listed here. For the best 33 // often) nor the ShortcutsProvider are listed here. For the best
34 // idea of how scoring works and what providers are affecting which 34 // idea of how scoring works and what providers are affecting which
35 // queries, play with chrome://omnibox/ for a while. While the tables 35 // queries, play with chrome://omnibox/ for a while. While the tables
36 // below may have some utility, nothing compares with first-hand 36 // below may have some utility, nothing compares with first-hand
37 // investigation and experience. 37 // investigation and experience.
38 // 38 //
39 // UNKNOWN input type: 39 // UNKNOWN input type:
Mark P 2012/09/28 00:55:13 When you're ready, please update the below tables
mrossetti 2012/10/02 00:44:16 I'll add comments now and can refine them later wh
40 // --------------------------------------------------------------------|----- 40 // --------------------------------------------------------------------|-----
41 // Keyword (non-substituting or in keyword UI mode, exact match) | 1500 41 // Keyword (non-substituting or in keyword UI mode, exact match) | 1500
42 // Extension App (exact match) | 1425 42 // Extension App (exact match) | 1425
43 // HistoryURL (good exact or inline autocomplete matches, some inexact)| 1410++ 43 // HistoryURL (good exact or inline autocomplete matches, some inexact)| 1410++
44 // HistoryURL (intranet url never visited match, some inexact matches) | 1400++ 44 // HistoryURL (intranet url never visited match, some inexact matches) | 1400++
45 // Search Primary Provider (past query in history within 2 days) | 1399** 45 // Search Primary Provider (past query in history within 2 days) | 1399**
46 // Search Primary Provider (what you typed) | 1300 46 // Search Primary Provider (what you typed) | 1300
47 // HistoryURL (what you typed, some inexact matches) | 1200++ 47 // HistoryURL (what you typed, some inexact matches) | 1200++
48 // Extension App (inexact match) | 1175*~ 48 // Extension App (inexact match) | 1175*~
49 // Keyword (substituting, exact match) | 1100 49 // Keyword (substituting, exact match) | 1100
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TYPE_BUILTIN = 1 << 0, 178 TYPE_BUILTIN = 1 << 0,
179 TYPE_CONTACT = 1 << 1, 179 TYPE_CONTACT = 1 << 1,
180 TYPE_EXTENSION_APP = 1 << 2, 180 TYPE_EXTENSION_APP = 1 << 2,
181 TYPE_HISTORY_CONTENTS = 1 << 3, 181 TYPE_HISTORY_CONTENTS = 1 << 3,
182 TYPE_HISTORY_QUICK = 1 << 4, 182 TYPE_HISTORY_QUICK = 1 << 4,
183 TYPE_HISTORY_URL = 1 << 5, 183 TYPE_HISTORY_URL = 1 << 5,
184 TYPE_KEYWORD = 1 << 6, 184 TYPE_KEYWORD = 1 << 6,
185 TYPE_SEARCH = 1 << 7, 185 TYPE_SEARCH = 1 << 7,
186 TYPE_SHORTCUTS = 1 << 8, 186 TYPE_SHORTCUTS = 1 << 8,
187 TYPE_ZERO_SUGGEST = 1 << 9, 187 TYPE_ZERO_SUGGEST = 1 << 9,
188 TYPE_BOOKMARK = 1 << 10,
188 }; 189 };
189 190
190 AutocompleteProvider(AutocompleteProviderListener* listener, 191 AutocompleteProvider(AutocompleteProviderListener* listener,
191 Profile* profile, 192 Profile* profile,
192 Type type); 193 Type type);
193 194
194 // Returns a string describing a particular AutocompleteProvider type. 195 // Returns a string describing a particular AutocompleteProvider type.
195 static const char* TypeToString(Type type); 196 static const char* TypeToString(Type type);
196 197
197 // Called to start an autocomplete query. The provider is responsible for 198 // Called to start an autocomplete query. The provider is responsible for
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 289
289 Type type_; 290 Type type_;
290 291
291 private: 292 private:
292 DISALLOW_COPY_AND_ASSIGN(AutocompleteProvider); 293 DISALLOW_COPY_AND_ASSIGN(AutocompleteProvider);
293 }; 294 };
294 295
295 typedef std::vector<AutocompleteProvider*> ACProviders; 296 typedef std::vector<AutocompleteProvider*> ACProviders;
296 297
297 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_ 298 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698