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

Unified Diff: components/omnibox/browser/search_provider.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/omnibox_view.cc ('k') | components/omnibox/browser/search_suggestion_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/search_provider.cc
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index 0ea10356bf91ee5b239050ff058905fe589584df..5d6ae6b771148c13099a4f2f6ba4824615333495 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -745,11 +745,6 @@ bool SearchProvider::IsQueryPotentionallyPrivate() const {
// If the input type might be a URL, we take extra care so that private data
// isn't sent to the server.
- // FORCED_QUERY means the user is explicitly asking us to search for this, so
- // we assume it isn't a URL and/or there isn't private data.
- if (input_.type() == metrics::OmniboxInputType::FORCED_QUERY)
- return false;
-
// Next we check the scheme. If this is UNKNOWN/URL with a scheme that isn't
// http/https/ftp, we shouldn't send it. Sending things like file: and data:
// is both a waste of time and a disclosure of potentially private, local
@@ -1316,7 +1311,6 @@ int SearchProvider::
switch (input_.type()) {
case metrics::OmniboxInputType::UNKNOWN:
case metrics::OmniboxInputType::QUERY:
- case metrics::OmniboxInputType::FORCED_QUERY:
return kNonURLVerbatimRelevance;
case metrics::OmniboxInputType::URL:
@@ -1426,13 +1420,6 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
net::UnescapeRule::SPACES, nullptr, nullptr,
&inline_autocomplete_offset),
client()->GetSchemeClassifier());
- // Preserve the forced query '?' prefix in |match.fill_into_edit|.
- // Otherwise, user edits to a suggestion would show non-Search results.
- if (input_.type() == metrics::OmniboxInputType::FORCED_QUERY) {
- match.fill_into_edit.insert(0, base::ASCIIToUTF16("?"));
- if (inline_autocomplete_offset != base::string16::npos)
- ++inline_autocomplete_offset;
- }
if (inline_autocomplete_offset != base::string16::npos) {
DCHECK(inline_autocomplete_offset <= match.fill_into_edit.length());
match.inline_autocompletion =
« no previous file with comments | « components/omnibox/browser/omnibox_view.cc ('k') | components/omnibox/browser/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698