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

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: Add includes for mac tests Created 4 years, 6 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 | « components/omnibox/browser/search_provider.cc ('k') | components/omnibox/browser/shortcuts_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dbead6aba02130f043f513f7347cb38e98e3a6fc..a764d82135ecfd86848b82287dd3c89109adeb15 100644
--- a/components/omnibox/browser/search_suggestion_parser.cc
+++ b/components/omnibox/browser/search_suggestion_parser.cc
@@ -454,9 +454,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) {
@@ -484,7 +481,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);
« no previous file with comments | « components/omnibox/browser/search_provider.cc ('k') | components/omnibox/browser/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698