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

Unified Diff: components/omnibox/browser/search_suggestion_parser.cc

Issue 1855423003: Interpret '?' and Ctrl-K or Ctrl-E as putting omnibox in keyword search mode for Default Search Pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed forced queries using '?'. Removed Ctrl-K preserving the user's keyword if they're already … Created 4 years, 8 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: components/omnibox/browser/search_suggestion_parser.cc
diff --git a/components/omnibox/browser/search_suggestion_parser.cc b/components/omnibox/browser/search_suggestion_parser.cc
index 5bb0c01ef2bd80754e08e9002e76a237f00b4237..badaed3e6fda392aab7578f6ab0e28e45fa936da 100644
--- a/components/omnibox/browser/search_suggestion_parser.cc
+++ b/components/omnibox/browser/search_suggestion_parser.cc
@@ -457,9 +457,6 @@ bool SearchSuggestionParser::ParseSuggestResults(
base::string16 suggestion;
std::string type;
int relevance = default_result_relevance;
- // Prohibit navsuggest in FORCED_QUERY mode. Users wants queries, not URLs.
- const bool allow_navsuggest =
- input.type() != metrics::OmniboxInputType::FORCED_QUERY;
const base::string16& trimmed_input =
base::CollapseWhitespace(input.text(), false);
for (size_t index = 0; results_list->GetString(index, &suggestion); ++index) {
@@ -487,7 +484,7 @@ bool SearchSuggestionParser::ParseSuggestResults(
// Do not blindly trust the URL coming from the server to be valid.
GURL url(url_formatter::FixupURL(base::UTF16ToUTF8(suggestion),
std::string()));
- if (url.is_valid() && allow_navsuggest) {
+ if (url.is_valid()) {
base::string16 title;
if (descriptions != NULL)
descriptions->GetString(index, &title);

Powered by Google App Engine
This is Rietveld 408576698