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

Unified Diff: chrome/browser/autocomplete/history_url_provider.cc

Issue 55603002: Move HasHTTPScheme to AutocompleteInput. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_url_provider.cc
===================================================================
--- chrome/browser/autocomplete/history_url_provider.cc (revision 231939)
+++ chrome/browser/autocomplete/history_url_provider.cc (working copy)
@@ -390,7 +390,7 @@
// |match_location| below. StringForURLDisplay() and TrimHttpPrefix() have
// slightly different behavior as well (the latter will strip even without
// two slashes after the scheme).
- DCHECK(!trim_http || !HasHTTPScheme(input.text()));
+ DCHECK(!trim_http || !AutocompleteInput::HasHTTPScheme(input.text()));
string16 display_string(provider->StringForURLDisplay(url, false, false));
const size_t offset = trim_http ? TrimHttpPrefix(&display_string) : 0;
match.fill_into_edit =
@@ -673,7 +673,7 @@
// Create a match for exactly what the user typed. This will only be used as
// a fallback in case we can't get the history service or URL DB; otherwise,
// we'll run this again in DoAutocomplete() and use that result instead.
- const bool trim_http = !HasHTTPScheme(input.text());
+ const bool trim_http = !AutocompleteInput::HasHTTPScheme(input.text());
// Don't do this for queries -- while we can sometimes mark up a match for
// this, it's not what the user wants, and just adds noise.
if ((input.type() != AutocompleteInput::QUERY) &&
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698