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

Unified Diff: net/base/net_util_icu.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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/base/network_activity_monitor_unittest.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 94e1a0d7232a65a7c517e714fa128fc571b47aa2..9d961aced0b03aae471f2551364819eee485fcfc 100644
--- a/net/base/net_util_icu.cc
+++ b/net/base/net_util_icu.cc
@@ -607,7 +607,7 @@ std::string GetDirectoryListingEntry(const base::string16& name,
// Negative size means unknown or not applicable (e.g. directory).
base::string16 size_string;
if (size >= 0)
- size_string = FormatBytesUnlocalized(size);
+ size_string = base::FormatBytesUnlocalized(size);
base::EscapeJSONString(size_string, true, &result);
result.append(",");
@@ -676,7 +676,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);
@@ -701,8 +702,8 @@ base::string16 FormatUrlWithAdjustments(
// formatted URL is directly pre-filled into an input field.) For this reason
// we avoid stripping "http://" in this case.
bool omit_http = (format_types & kFormatUrlOmitHTTP) &&
- EqualsASCII(url_string, kHTTP) &&
- !StartsWithASCII(url.host(), kFTP, true);
+ EqualsASCII(url_string, kHTTP) &&
+ !base::StartsWithASCII(url.host(), kFTP, true);
new_parsed->scheme = parsed.scheme;
// Username & password.
@@ -789,7 +790,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),
+ base::CompareCase::SENSITIVE)) {
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/base/network_activity_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698