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

Unified Diff: extensions/browser/guest_view/web_view/web_view_apitest.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: extensions/browser/guest_view/web_view/web_view_apitest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_apitest.cc b/extensions/browser/guest_view/web_view/web_view_apitest.cc
index 46744af17765e2c56f9035110054cbca51a8c01d..0e1b24ef6d0abd5fbcba5cc14d4c33e338ebd6e8 100644
--- a/extensions/browser/guest_view/web_view/web_view_apitest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc
@@ -59,13 +59,14 @@ static scoped_ptr<net::test_server::HttpResponse> UserAgentResponseHandler(
const std::string& path,
const GURL& redirect_target,
const net::test_server::HttpRequest& request) {
- if (!base::StartsWithASCII(path, request.relative_url, true))
+ if (!base::StartsWith(path, request.relative_url,
+ base::CompareCase::SENSITIVE))
return scoped_ptr<net::test_server::HttpResponse>();
std::map<std::string, std::string>::const_iterator it =
request.headers.find("User-Agent");
EXPECT_TRUE(it != request.headers.end());
- if (!base::StartsWithASCII("foobar", it->second, true))
+ if (!base::StartsWith("foobar", it->second, base::CompareCase::SENSITIVE))
return scoped_ptr<net::test_server::HttpResponse>();
scoped_ptr<net::test_server::BasicHttpResponse> http_response(
@@ -104,7 +105,8 @@ scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler(
const std::string& path,
const GURL& redirect_target,
const net::test_server::HttpRequest& request) {
- if (!base::StartsWithASCII(path, request.relative_url, true))
+ if (!base::StartsWith(path, request.relative_url,
+ base::CompareCase::SENSITIVE))
return scoped_ptr<net::test_server::HttpResponse>();
scoped_ptr<net::test_server::BasicHttpResponse> http_response(
@@ -118,7 +120,8 @@ scoped_ptr<net::test_server::HttpResponse> RedirectResponseHandler(
scoped_ptr<net::test_server::HttpResponse> EmptyResponseHandler(
const std::string& path,
const net::test_server::HttpRequest& request) {
- if (base::StartsWithASCII(path, request.relative_url, true)) {
+ if (base::StartsWith(path, request.relative_url,
+ base::CompareCase::SENSITIVE)) {
return scoped_ptr<net::test_server::HttpResponse>(new EmptyHttpResponse);
}
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698