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

Unified Diff: content/browser/service_worker/service_worker_utils.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
Index: content/browser/service_worker/service_worker_utils.cc
diff --git a/content/browser/service_worker/service_worker_utils.cc b/content/browser/service_worker/service_worker_utils.cc
index 7cfaccebe525727ed7c8a6250771514eb7d1dee4..71ddc611d00d9fd00382bcc119fb819dafca3ba3 100644
--- a/content/browser/service_worker/service_worker_utils.cc
+++ b/content/browser/service_worker/service_worker_utils.cc
@@ -36,7 +36,8 @@ bool PathContainsDisallowedCharacter(const GURL& url) {
bool ServiceWorkerUtils::ScopeMatches(const GURL& scope, const GURL& url) {
DCHECK(!scope.has_ref());
DCHECK(!url.has_ref());
- return base::StartsWithASCII(url.spec(), scope.spec(), true);
+ return base::StartsWith(url.spec(), scope.spec(),
+ base::CompareCase::SENSITIVE);
}
// static
@@ -69,7 +70,8 @@ bool ServiceWorkerUtils::IsPathRestrictionSatisfied(
}
std::string scope_string = scope.path();
- if (!base::StartsWithASCII(scope_string, max_scope_string, true)) {
+ if (!base::StartsWith(scope_string, max_scope_string,
+ base::CompareCase::SENSITIVE)) {
*error_message = "The path of the provided scope ('";
error_message->append(scope_string);
error_message->append("') is not under the max scope allowed (");
« no previous file with comments | « content/browser/service_worker/service_worker_database.cc ('k') | content/browser/session_history_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698