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

Unified Diff: components/cronet/android/test/native_test_server.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: components/cronet/android/test/native_test_server.cc
diff --git a/components/cronet/android/test/native_test_server.cc b/components/cronet/android/test/native_test_server.cc
index 022b1c58da709e1abc6153fc76178726bb9b491a..908ddb07e664414ad607f4425a907b54cad03c69 100644
--- a/components/cronet/android/test/native_test_server.cc
+++ b/components/cronet/android/test/native_test_server.cc
@@ -102,7 +102,8 @@ scoped_ptr<net::test_server::HttpResponse> NativeTestServerRequestHandler(
return response.Pass();
}
- if (base::StartsWithASCII(request.relative_url, kEchoHeaderPath, true)) {
+ if (base::StartsWith(request.relative_url, kEchoHeaderPath,
+ base::CompareCase::SENSITIVE)) {
GURL url = g_test_server->GetURL(request.relative_url);
auto it = request.headers.find(url.query());
if (it != request.headers.end()) {
@@ -141,7 +142,8 @@ scoped_ptr<net::test_server::HttpResponse> SdchRequestHandler(
DCHECK(get_data_dir);
dir_path = dir_path.Append(FILE_PATH_LITERAL("test"));
- if (base::StartsWithASCII(request.relative_url, kSdchPath, true)) {
+ if (base::StartsWith(request.relative_url, kSdchPath,
+ base::CompareCase::SENSITIVE)) {
base::FilePath file_path = dir_path.Append("sdch/index");
scoped_ptr<CustomHttpResponse> response =
ConstructResponseBasedOnFile(file_path).Pass();
@@ -162,7 +164,8 @@ scoped_ptr<net::test_server::HttpResponse> SdchRequestHandler(
return response.Pass();
}
- if (base::StartsWithASCII(request.relative_url, kSdchTestPath, true)) {
+ if (base::StartsWith(request.relative_url, kSdchTestPath,
+ base::CompareCase::SENSITIVE)) {
auto avail_dictionary_header = request.headers.find("Avail-Dictionary");
if (avail_dictionary_header != request.headers.end()) {
base::FilePath file_path = dir_path.Append(

Powered by Google App Engine
This is Rietveld 408576698