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

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

Issue 108643003: Omnibox: Bug Fixes for Shortcuts Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, post-revert Created 7 years 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
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_provider.h
diff --git a/chrome/browser/autocomplete/shortcuts_provider.h b/chrome/browser/autocomplete/shortcuts_provider.h
index a6b4f9736f07aa4bcdf29d7985014f173e7aa3b4..471d0ff74bf36991d83183e89e584f2c8a939a3c 100644
--- a/chrome/browser/autocomplete/shortcuts_provider.h
+++ b/chrome/browser/autocomplete/shortcuts_provider.h
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "chrome/browser/autocomplete/autocomplete_provider.h"
+#include "chrome/browser/autocomplete/url_prefix.h"
#include "chrome/browser/history/shortcuts_backend.h"
class Profile;
@@ -50,16 +51,18 @@ class ShortcutsProvider
// Performs the autocomplete matching and scoring.
void GetMatches(const AutocompleteInput& input);
- // Returns an AutocompleteMatch corresponding to |shortcut|. Assigns it
- // |relevance| score in the process, and highlights the description
- // and contents against |term_string|, which should be the lower-cased
- // version of the user's input. If |prevent_inline_autocomplete|, no
+ // Returns an AutocompleteMatch corresponding to |shortcut|. Assigns it
+ // |relevance| score in the process, and highlights the description and
+ // contents against |term_string|, which should be the lower-cased version
+ // of the user's input. |term_string| and |fixed_up_term_string| are used
+ // to decide what can be inlined. If |prevent_inline_autocomplete|, no
// matches with inline completions will be allowed to be the default match.
AutocompleteMatch ShortcutToACMatch(
const history::ShortcutsBackend::Shortcut& shortcut,
int relevance,
const base::string16& term_string,
- bool prevent_inline_autocomplete);
+ const base::string16& fixed_up_term_string,
+ const bool prevent_inline_autocomplete);
// Returns a map mapping characters to groups of words from |text| that start
// with those characters, ordered lexicographically descending so that longer
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698