summaryrefslogtreecommitdiffstats
path: root/rlz
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-16 16:57:33 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-16 23:58:34 +0000
commit955093110ad64d5ec6f5426991efaa4a680b5d6f (patch)
tree19368cdb8861595640715e1072789959729efc2d /rlz
parent387e05a79c7ae346ba7db36977ddfca7ca6f10a3 (diff)
downloadchromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.zip
chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.gz
chromium_src-955093110ad64d5ec6f5426991efaa4a680b5d6f.tar.bz2
Remove legacy StartsWithASCII function.
This replaces it with base::StartsWith and the appropriate case flag. Since the existing version only ever did case-insensitive tests in ASCII, there should be no behavior change. BUG=506255 TBR=jam Review URL: https://codereview.chromium.org/1242023005 Cr-Commit-Position: refs/heads/master@{#339175}
Diffstat (limited to 'rlz')
-rw-r--r--rlz/lib/rlz_lib.cc14
-rw-r--r--rlz/win/lib/machine_deal.cc3
2 files changed, 10 insertions, 7 deletions
diff --git a/rlz/lib/rlz_lib.cc b/rlz/lib/rlz_lib.cc
index 4a3cfde..c5403f6 100644
--- a/rlz/lib/rlz_lib.cc
+++ b/rlz/lib/rlz_lib.cc
@@ -422,7 +422,8 @@ bool IsPingResponseValid(const char* response, int* checksum_idx) {
return false;
} else {
checksum_param = "crc32: "; // Empty response case.
- if (!base::StartsWithASCII(response_string, checksum_param, true))
+ if (!base::StartsWith(response_string, checksum_param,
+ base::CompareCase::SENSITIVE))
return false;
checksum_index = 0;
@@ -534,8 +535,8 @@ bool ParsePingResponse(Product product, const char* response) {
std::string response_line;
response_line = response_string.substr(line_begin, line_end - line_begin);
- if (base::StartsWithASCII(response_line, kRlzCgiVariable,
- true)) { // An RLZ.
+ if (base::StartsWith(response_line, kRlzCgiVariable,
+ base::CompareCase::SENSITIVE)) { // An RLZ.
int separator_index = -1;
if ((separator_index = response_line.find(": ")) < 0)
continue; // Not a valid key-value pair.
@@ -561,7 +562,8 @@ bool ParsePingResponse(Product product, const char* response) {
if (IsAccessPointSupported(point))
SetAccessPointRlz(point, rlz_value.substr(0, rlz_length).c_str());
- } else if (base::StartsWithASCII(response_line, events_variable, true)) {
+ } else if (base::StartsWith(response_line, events_variable,
+ base::CompareCase::SENSITIVE)) {
// Clear events which server parsed.
std::vector<ReturnedEvent> event_array;
GetEventsFromResponseString(response_line, events_variable, &event_array);
@@ -569,8 +571,8 @@ bool ParsePingResponse(Product product, const char* response) {
ClearProductEvent(product, event_array[i].access_point,
event_array[i].event_type);
}
- } else if (base::StartsWithASCII(response_line, stateful_events_variable,
- true)) {
+ } else if (base::StartsWith(response_line, stateful_events_variable,
+ base::CompareCase::SENSITIVE)) {
// Record any stateful events the server send over.
std::vector<ReturnedEvent> event_array;
GetEventsFromResponseString(response_line, stateful_events_variable,
diff --git a/rlz/win/lib/machine_deal.cc b/rlz/win/lib/machine_deal.cc
index 7c8bbaa..8d6d369e 100644
--- a/rlz/win/lib/machine_deal.cc
+++ b/rlz/win/lib/machine_deal.cc
@@ -103,7 +103,8 @@ bool GetResponseValue(const std::string& response_line,
value->clear();
- if (!base::StartsWithASCII(response_line, response_key, true))
+ if (!base::StartsWith(response_line, response_key,
+ base::CompareCase::SENSITIVE))
return false;
std::vector<std::string> tokens;