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

Unified Diff: chrome/browser/autocomplete/history_quick_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: chrome/browser/autocomplete/history_quick_provider.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 1871bf2ba8947a5cd7a2c5b6519d5780a542965e..b1505dd25ee6740c130b4732ff21ff48f088d6f9 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -14,6 +14,7 @@
#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
@@ -269,8 +270,11 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
!PreventInlineAutocomplete(autocomplete_input_);
}
+ std::vector<base::string16> words;
+ base::SplitString(autocomplete_input_.text(), ' ', &words);
Peter Kasting 2015/06/01 21:04:08 I'm concerned about all these files doing a manual
Mark P 2015/06/01 22:05:50 I would think any decent break iterator would spli
Peter Kasting 2015/06/01 22:21:58 Fair enough.
Mark P 2015/06/04 23:31:31 Done. Let me know what you think.
match.EnsureUWYTIsAllowedToBeDefault(
autocomplete_input_.canonicalized_url(),
+ words,
TemplateURLServiceFactory::GetForProfile(profile_));
// Format the description autocomplete presentation.
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_url_provider_unittest.cc » ('j') | components/omnibox/autocomplete_match.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698