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

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: refactored, as discussed 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..dcffc66a301f8279c269b8e9ca5d7fba2b54453b 100644
--- a/components/omnibox/autocomplete_input.h
+++ b/components/omnibox/autocomplete_input.h
@@ -184,6 +184,14 @@ 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://,
Peter Kasting 2015/06/09 20:36:39 Nit: text() -> text_ "...or https:// plus at leas
Mark P 2015/06/10 23:38:34 Done.
+ // stored without the prefix. Used in duplicate elimination to detect
Peter Kasting 2015/06/09 20:36:39 Nit: prefix -> scheme (Technically this is less a
Mark P 2015/06/10 23:38:34 Okay, done.
+ // whether the user expressed interest in a particular URL with a requested
+ // scheme (and hence we shouldn't de-dup across schemes).
Peter Kasting 2015/06/09 20:36:39 Nit: How about: "...to detect whether, for a give
Mark P 2015/06/10 23:38:34 Ah, that's good to make a reference to where the i
+ const std::vector<base::string16>& http_following_terms() const {
Peter Kasting 2015/06/09 20:36:39 Hmm, I don't love this name... maybe terms_followi
Mark P 2015/06/10 23:38:34 The latter sounds better to me (though as you admi
+ return http_following_terms_;
+ }
+
// Resets all internal variables to the null-constructed state.
void Clear();
@@ -204,6 +212,7 @@ class AutocompleteInput {
bool prefer_keyword_;
bool allow_exact_keyword_match_;
bool want_asynchronous_matches_;
+ std::vector<base::string16> http_following_terms_;
};
#endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_INPUT_H_

Powered by Google App Engine
This is Rietveld 408576698