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

Side by Side Diff: gpu/config/gpu_test_expectations_parser.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 unified diff | Download patch
« no previous file with comments | « gpu/config/gpu_info_collector_linux.cc ('k') | ios/chrome/app/safe_mode_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/config/gpu_test_expectations_parser.h" 5 #include "gpu/config/gpu_test_expectations_parser.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 "entry invalid, likely wrong modifiers combination", 124 "entry invalid, likely wrong modifiers combination",
125 "entry with OS modifier conflicts", 125 "entry with OS modifier conflicts",
126 "entry with GPU vendor modifier conflicts", 126 "entry with GPU vendor modifier conflicts",
127 "entry with GPU build type conflicts", 127 "entry with GPU build type conflicts",
128 "entry with GPU device id conflicts or malformat", 128 "entry with GPU device id conflicts or malformat",
129 "entry with expectation modifier conflicts", 129 "entry with expectation modifier conflicts",
130 "two entries's configs overlap", 130 "two entries's configs overlap",
131 }; 131 };
132 132
133 Token ParseToken(const std::string& word) { 133 Token ParseToken(const std::string& word) {
134 if (base::StartsWithASCII(word, "//", false)) 134 if (base::StartsWith(word, "//", base::CompareCase::INSENSITIVE_ASCII))
135 return kTokenComment; 135 return kTokenComment;
136 if (base::StartsWithASCII(word, "0x", false)) 136 if (base::StartsWith(word, "0x", base::CompareCase::INSENSITIVE_ASCII))
137 return kConfigGPUDeviceID; 137 return kConfigGPUDeviceID;
138 138
139 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { 139 for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
140 if (base::LowerCaseEqualsASCII(word, kTokenData[i].name)) 140 if (base::LowerCaseEqualsASCII(word, kTokenData[i].name))
141 return static_cast<Token>(i); 141 return static_cast<Token>(i);
142 } 142 }
143 return kTokenWord; 143 return kTokenWord;
144 } 144 }
145 145
146 // reference name can have the last character as *. 146 // reference name can have the last character as *.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 message.c_str())); 503 message.c_str()));
504 } 504 }
505 505
506 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() 506 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry()
507 : test_expectation(0), 507 : test_expectation(0),
508 line_number(0) { 508 line_number(0) {
509 } 509 }
510 510
511 } // namespace gpu 511 } // namespace gpu
512 512
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_linux.cc ('k') | ios/chrome/app/safe_mode_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698