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

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

Issue 12081002: about:omnibox - add "in keyword mode" checkbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forth -> fourth Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b530b17c4a5a0250b290ae35baf5b7c26f648748..4449359af5b6ccf9667c9344416c161afcd80b6c 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
@@ -139,20 +139,21 @@ void OmniboxUIHandler::AddResultToDictionary(const std::string& prefix,
output->SetInteger(prefix + ".num_items", i);
}
-void OmniboxUIHandler::StartOmniboxQuery(
- const base::ListValue* three_element_input_string) {
- DCHECK_EQ(3u, three_element_input_string->GetSize());
+void OmniboxUIHandler::StartOmniboxQuery(const base::ListValue* input) {
+ DCHECK_EQ(4u, input->GetSize());
string16 input_string;
- bool return_val = three_element_input_string->GetString(0, &input_string);
- DCHECK(return_val);
- bool prevent_inline_autocomplete;
- return_val =
- three_element_input_string->GetBoolean(1, &prevent_inline_autocomplete);
+ bool return_val = input->GetString(0, &input_string);
DCHECK(return_val);
int cursor_position_int;
- return_val = three_element_input_string->GetInteger(2, &cursor_position_int);
+ return_val = input->GetInteger(1, &cursor_position_int);
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|
@@ -166,7 +167,7 @@ void OmniboxUIHandler::StartOmniboxQuery(
cursor_position,
empty_string, // user's desired tld (top-level domain)
prevent_inline_autocomplete,
- false, // no preferred keyword provider
+ prefer_keyword,
true, // allow exact keyword matches
AutocompleteInput::ALL_MATCHES)); // want all matches
}
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698