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

Unified Diff: dart_library_provider_files.cc

Issue 2006303002: base::StartsWithASCII() -> base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/tonic@master
Patch Set: Created 4 years, 7 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 | « no previous file | dart_library_provider_network.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart_library_provider_files.cc
diff --git a/dart_library_provider_files.cc b/dart_library_provider_files.cc
index 25a30012685d2e11f16073640eb9249e1380d36a..89aeefe6aa975e4e776b379f296a37c958dbe6ba 100644
--- a/dart_library_provider_files.cc
+++ b/dart_library_provider_files.cc
@@ -62,7 +62,7 @@ void DartLibraryProviderFiles::GetLibraryAsStream(
}
std::string DartLibraryProviderFiles::CanonicalizePackageURL(std::string url) {
- DCHECK(base::StartsWithASCII(url, "package:", true));
+ DCHECK(base::StartsWith(url, "package:", base::CompareCase::SENSITIVE));
base::ReplaceFirstSubstringAfterOffset(&url, 0, "package:", "");
return package_root_.Append(url).AsUTF8Unsafe();
}
@@ -70,9 +70,9 @@ std::string DartLibraryProviderFiles::CanonicalizePackageURL(std::string url) {
Dart_Handle DartLibraryProviderFiles::CanonicalizeURL(Dart_Handle library,
Dart_Handle url) {
std::string string = StdStringFromDart(url);
- if (base::StartsWithASCII(string, "dart:", true))
+ if (base::StartsWith(string, "dart:", base::CompareCase::SENSITIVE))
return url;
- if (base::StartsWithASCII(string, "package:", true))
+ if (base::StartsWith(string, "package:", base::CompareCase::SENSITIVE))
return StdStringToDart(CanonicalizePackageURL(string));
base::FilePath base_path(StdStringFromDart(Dart_LibraryUrl(library)));
base::FilePath resolved_path = base_path.DirName().Append(string);
« no previous file with comments | « no previous file | dart_library_provider_network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698