Remove some legacy versions of StartsWith and EndsWith.
This just replaces
true -> base::CompareCase::SENSITIVE
false -> base::CompareCase::INSENSITIVE_ASCII
I checked the insensitive cases to make sure they're not doing anything suspicious. The old version is a sometimes-correct Unicode comparison so converting to INSENSTITIVE_ASCII isn't a no-op. However, generally the prefix/suffix checking is done against a hardcoded string so there were very few cases to actually look at.
extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc has a not-quite search-and-replace change where I changed the type of a class variable.
BUG=506255
TBR=jam
Reland of http://crrev.com/1239493005
Review URL: https://codereview.chromium.org/1233043003
Cr-Commit-Position: refs/heads/master@{#339071}
diff --git a/net/websockets/websocket_stream_cookie_test.cc b/net/websockets/websocket_stream_cookie_test.cc
index 8e4d9c4..d1f41a75 100644
--- a/net/websockets/websocket_stream_cookie_test.cc
+++ b/net/websockets/websocket_stream_cookie_test.cc
@@ -35,7 +35,8 @@
// We assume cookie_header ends with CRLF if not empty, as
// WebSocketStandardRequestWithCookies requires. Use AddCRLFIfNotEmpty
// in a call site.
- CHECK(cookie_header.empty() || base::EndsWith(cookie_header, "\r\n", true));
+ CHECK(cookie_header.empty() ||
+ base::EndsWith(cookie_header, "\r\n", base::CompareCase::SENSITIVE));
url_request_context_host_.SetExpectations(
WebSocketStandardRequestWithCookies(url.path(), url.host(), origin,