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

Unified Diff: components/omnibox/autocomplete_input.h

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: revise logic Created 5 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
Index: components/omnibox/autocomplete_input.h
diff --git a/components/omnibox/autocomplete_input.h b/components/omnibox/autocomplete_input.h
index 8aa5235869daa129824ccf94420030c241a1e9ca..eb7738742dbdbecbbae9cded50299b0cedf17074 100644
--- a/components/omnibox/autocomplete_input.h
+++ b/components/omnibox/autocomplete_input.h
@@ -184,6 +184,15 @@ class AutocompleteInput {
// when processing this input.
bool want_asynchronous_matches() const { return want_asynchronous_matches_; }
+ // Returns list of words in text_ that start with http:// or https:// plus
Peter Kasting 2015/06/11 05:21:44 Nit: list of words in text_ -> the terms in |text_
Mark P 2015/06/11 22:11:42 Done.
+ // at least one more characther, stored without the scheme. Used in
Peter Kasting 2015/06/11 05:21:44 Nit: character
Mark P 2015/06/11 22:11:42 Done.
+ // duplicate elimination to detect whether, for a given URL, the user may
+ // have started typing that URL with an explicit scheme; see comments on
+ // AutocompleteMatch::GURLToStrippedGURL().
+ const std::vector<base::string16>& terms_prefixed_by_http_or_https() const {
+ return terms_prefixed_by_http_or_https_;
+ }
+
// Resets all internal variables to the null-constructed state.
void Clear();
@@ -204,6 +213,7 @@ class AutocompleteInput {
bool prefer_keyword_;
bool allow_exact_keyword_match_;
bool want_asynchronous_matches_;
+ std::vector<base::string16> terms_prefixed_by_http_or_https_;
};
#endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_INPUT_H_

Powered by Google App Engine
This is Rietveld 408576698