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

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc

Issue 12623029: Upstreaming mechanism to add query refinement to omnibox searches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied Peter's comments. Created 7 years, 9 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/ui/webui/omnibox/omnibox_ui_handler.cc
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
index b8d566523b05241be987b848a9d2f8d35b848bd9..9dd033b8b87f6bc1359d3ef3ea0f03e80ed6a942 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
@@ -175,17 +175,15 @@ void OmniboxUIHandler::StartOmniboxQuery(const base::ListValue* input) {
string16 input_string;
bool return_val = input->GetString(0, &input_string);
DCHECK(return_val);
- int cursor_position_int;
- return_val = input->GetInteger(1, &cursor_position_int);
+ int cursor_position;
+ return_val = input->GetInteger(1, &cursor_position);
DCHECK(return_val);
- size_t cursor_position = cursor_position_int;
bool prevent_inline_autocomplete;
return_val = input->GetBoolean(2, &prevent_inline_autocomplete);
DCHECK(return_val);
bool prefer_keyword;
return_val = input->GetBoolean(3, &prefer_keyword);
DCHECK(return_val);
- string16 empty_string;
// Reset the controller. If we don't do this, then the
// AutocompleteController might inappropriately set its |minimal_changes|
// variable (or something else) and some providers will short-circuit
@@ -196,7 +194,8 @@ void OmniboxUIHandler::StartOmniboxQuery(const base::ListValue* input) {
controller_->Start(AutocompleteInput(
input_string,
cursor_position,
- empty_string, // user's desired tld (top-level domain)
+ string16(), // user's desired tld (top-level domain)
+ GURL(),
prevent_inline_autocomplete,
prefer_keyword,
true, // allow exact keyword matches
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/webui/options/home_page_overlay_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698