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

Unified Diff: net/base/net_util_icu.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger 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 | « net/base/net_util.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util_icu.cc
diff --git a/net/base/net_util_icu.cc b/net/base/net_util_icu.cc
index 08be72fbf65edcf815316d94762cb2375568ef0f..01204a3e672c44ac5ad808372c1cbec1da25f24a 100644
--- a/net/base/net_util_icu.cc
+++ b/net/base/net_util_icu.cc
@@ -679,7 +679,8 @@ base::string16 FormatUrlWithAdjustments(
// Reject "view-source:view-source:..." to avoid deep recursion.
const char kViewSourceTwice[] = "view-source:view-source:";
if (url.SchemeIs(kViewSource) &&
- !StartsWithASCII(url.possibly_invalid_spec(), kViewSourceTwice, false)) {
+ !base::StartsWithASCII(url.possibly_invalid_spec(), kViewSourceTwice,
+ false)) {
return FormatViewSourceUrl(url, languages, format_types,
unescape_rules, new_parsed, prefix_end,
adjustments);
@@ -705,7 +706,7 @@ base::string16 FormatUrlWithAdjustments(
// we avoid stripping "http://" in this case.
bool omit_http = (format_types & kFormatUrlOmitHTTP) &&
base::EqualsASCII(url_string, kHTTP) &&
- !StartsWithASCII(url.host(), kFTP, true);
+ !base::StartsWithASCII(url.host(), kFTP, true);
new_parsed->scheme = parsed.scheme;
// Username & password.
@@ -792,7 +793,8 @@ base::string16 FormatUrlWithAdjustments(
&url_string, &new_parsed->ref, adjustments);
// If we need to strip out http do it after the fact.
- if (omit_http && StartsWith(url_string, base::ASCIIToUTF16(kHTTP), true)) {
+ if (omit_http &&
+ base::StartsWith(url_string, base::ASCIIToUTF16(kHTTP), true)) {
const size_t kHTTPSize = arraysize(kHTTP) - 1;
url_string = url_string.substr(kHTTPSize);
// Because offsets in the |adjustments| are already calculated with respect
« no previous file with comments | « net/base/net_util.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698