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

Unified Diff: net/base/mime_util.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 | « mojo/runner/shell_apptest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.cc
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 4c0d1e0cb7c19ca86903525f301d1331d124de8f..4468fc4d6e0f9c790084da8161a44a06b8135570 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -283,7 +283,7 @@ bool MimeUtil::MatchesMimeType(const std::string& mime_type_pattern,
const std::string left(base_pattern.substr(0, star));
const std::string right(base_pattern.substr(star + 1));
- if (!StartsWithASCII(base_type, left, false))
+ if (!base::StartsWithASCII(base_type, left, false))
return false;
if (!right.empty() && !EndsWith(base_type, right, false))
@@ -330,7 +330,8 @@ bool MimeUtil::IsValidTopLevelMimeType(const std::string& type_string) const {
return true;
}
- return type_string.size() > 2 && StartsWithASCII(type_string, "x-", false);
+ return type_string.size() > 2 &&
+ base::StartsWithASCII(type_string, "x-", false);
}
//----------------------------------------------------------------------------
@@ -457,7 +458,8 @@ void GetExtensionsFromHardCodedMappings(
const std::string& leading_mime_type,
base::hash_set<base::FilePath::StringType>* extensions) {
for (size_t i = 0; i < mappings_len; ++i) {
- if (StartsWithASCII(mappings[i].mime_type, leading_mime_type, false)) {
+ if (base::StartsWithASCII(mappings[i].mime_type, leading_mime_type,
+ false)) {
std::vector<string> this_extensions;
base::SplitString(mappings[i].extensions, ',', &this_extensions);
for (size_t j = 0; j < this_extensions.size(); ++j) {
« no previous file with comments | « mojo/runner/shell_apptest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698