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

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: fix browsertests compile error (sigh) 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
« no previous file with comments | « components/omnibox/autocomplete_controller.cc ('k') | components/omnibox/autocomplete_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/autocomplete_input.h
diff --git a/components/omnibox/autocomplete_input.h b/components/omnibox/autocomplete_input.h
index 4d72f07f9d333c3b6d52f7e407f1d0cd54824bcd..bd3d697da3f627857a507b1f895df70733caba4a 100644
--- a/components/omnibox/autocomplete_input.h
+++ b/components/omnibox/autocomplete_input.h
@@ -194,6 +194,15 @@ class AutocompleteInput {
// focused.
bool from_omnibox_focus() const { return from_omnibox_focus_; }
+ // Returns the terms in |text_| that start with http:// or https:// plus
+ // at least one more character, stored without the scheme. Used in
+ // 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();
@@ -215,6 +224,7 @@ class AutocompleteInput {
bool allow_exact_keyword_match_;
bool want_asynchronous_matches_;
bool from_omnibox_focus_;
+ std::vector<base::string16> terms_prefixed_by_http_or_https_;
};
#endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_INPUT_H_
« no previous file with comments | « components/omnibox/autocomplete_controller.cc ('k') | components/omnibox/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698