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

Unified Diff: components/omnibox/search_provider.cc

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no equivalence across schemes if any scheme is present Created 5 years, 7 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/search_provider.cc
diff --git a/components/omnibox/search_provider.cc b/components/omnibox/search_provider.cc
index 670debf1d3814e84a53f021148f752217a761492..4c236e68ee0d64d7549aa10b2091d13ba15db62d 100644
--- a/components/omnibox/search_provider.cc
+++ b/components/omnibox/search_provider.cc
@@ -16,6 +16,7 @@
#include "base/metrics/histogram.h"
#include "base/metrics/user_metrics.h"
#include "base/rand_util.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/history/core/browser/in_memory_database.h"
@@ -1436,8 +1437,10 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
!navigation.received_after_last_keystroke() &&
(match.inline_autocompletion.empty() ||
(!input_.prevent_inline_autocomplete() && !trimmed_whitespace));
+ std::vector<base::string16> words;
+ base::SplitString(input_.text(), ' ', &words);
match.EnsureUWYTIsAllowedToBeDefault(
- input_.canonicalized_url(), providers_.template_url_service());
+ input_.canonicalized_url(), words, providers_.template_url_service());
match.contents = navigation.match_contents();
match.contents_class = navigation.match_contents_class();
« components/omnibox/autocomplete_result.cc ('K') | « components/omnibox/autocomplete_result.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698