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

Unified Diff: gpu/config/gpu_test_expectations_parser.cc

Issue 2022983003: Roll base to 5e00da80f6adb7082d1c0e88d3274cf87cc43bc5 and tonic to f7acabb8fa6c91124486a41194eac3cd… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « gpu/config/gpu_info_collector_linux.cc ('k') | gpu/config/gpu_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_test_expectations_parser.cc
diff --git a/gpu/config/gpu_test_expectations_parser.cc b/gpu/config/gpu_test_expectations_parser.cc
index 9a6e191af553b206c7b8945fa55925bf37e57b29..82b3858d3f63325acb26890ee296583790dd712d 100644
--- a/gpu/config/gpu_test_expectations_parser.cc
+++ b/gpu/config/gpu_test_expectations_parser.cc
@@ -129,9 +129,9 @@ const char* kErrorMessage[] = {
};
Token ParseToken(const std::string& word) {
- if (base::StartsWithASCII(word, "//", false))
+ if (base::StartsWith(word, "//", base::CompareCase::INSENSITIVE_ASCII))
return kTokenComment;
- if (base::StartsWithASCII(word, "0x", false))
+ if (base::StartsWith(word, "0x", base::CompareCase::INSENSITIVE_ASCII))
return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -172,8 +172,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) {
entries_.clear();
error_messages_.clear();
- std::vector<std::string> lines;
- base::SplitString(data, '\n', &lines);
+ std::vector<std::string> lines = base::SplitString(
+ data, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
bool rt = true;
for (size_t i = 0; i < lines.size(); ++i) {
if (!ParseLine(lines[i], i + 1))
@@ -219,8 +219,9 @@ GPUTestExpectationsParser::GetErrorMessages() const {
bool GPUTestExpectationsParser::ParseConfig(
const std::string& config_data, GPUTestConfig* config) {
DCHECK(config);
- std::vector<std::string> tokens;
- base::SplitStringAlongWhitespace(config_data, &tokens);
+ std::vector<std::string> tokens =
+ base::SplitString(config_data, base::kWhitespaceASCII,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (size_t i = 0; i < tokens.size(); ++i) {
Token token = ParseToken(tokens[i]);
@@ -263,8 +264,9 @@ bool GPUTestExpectationsParser::ParseConfig(
bool GPUTestExpectationsParser::ParseLine(
const std::string& line_data, size_t line_number) {
- std::vector<std::string> tokens;
- base::SplitStringAlongWhitespace(line_data, &tokens);
+ std::vector<std::string> tokens =
+ base::SplitString(line_data, base::kWhitespaceASCII,
+ base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
int32 stage = kLineParserBegin;
GPUTestExpectationEntry entry;
entry.line_number = line_number;
« no previous file with comments | « gpu/config/gpu_info_collector_linux.cc ('k') | gpu/config/gpu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698