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

Unified Diff: gpu/config/gpu_test_expectations_parser.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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 d44e5bb29846adb915f6104d7b497c6156317fa1..27a1487b937bbde5f84d2a84ca18aea8dd04439e 100644
--- a/gpu/config/gpu_test_expectations_parser.cc
+++ b/gpu/config/gpu_test_expectations_parser.cc
@@ -187,8 +187,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::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
bool rt = true;
for (size_t i = 0; i < lines.size(); ++i) {
if (!ParseLine(lines[i], i + 1))
@@ -234,8 +234,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]);
@@ -284,8 +285,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