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

Side by Side Diff: gpu/config/gpu_test_expectations_parser.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « gpu/config/gpu_info_collector_x11.cc ('k') | gpu/tools/compositor_model_bench/render_tree.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/file_util.h" 7 #include "base/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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 return rt; 185 return rt;
186 } 186 }
187 187
188 bool GPUTestExpectationsParser::LoadTestExpectations( 188 bool GPUTestExpectationsParser::LoadTestExpectations(
189 const base::FilePath& path) { 189 const base::FilePath& path) {
190 entries_.clear(); 190 entries_.clear();
191 error_messages_.clear(); 191 error_messages_.clear();
192 192
193 std::string data; 193 std::string data;
194 if (!file_util::ReadFileToString(path, &data)) { 194 if (!base::ReadFileToString(path, &data)) {
195 error_messages_.push_back(kErrorMessage[kErrorFileIO]); 195 error_messages_.push_back(kErrorMessage[kErrorFileIO]);
196 return false; 196 return false;
197 } 197 }
198 return LoadTestExpectations(data); 198 return LoadTestExpectations(data);
199 } 199 }
200 200
201 int32 GPUTestExpectationsParser::GetTestExpectation( 201 int32 GPUTestExpectationsParser::GetTestExpectation(
202 const std::string& test_name, 202 const std::string& test_name,
203 const GPUTestBotConfig& bot_config) const { 203 const GPUTestBotConfig& bot_config) const {
204 for (size_t i = 0; i < entries_.size(); ++i) { 204 for (size_t i = 0; i < entries_.size(); ++i) {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 message.c_str())); 494 message.c_str()));
495 } 495 }
496 496
497 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() 497 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry()
498 : test_expectation(0), 498 : test_expectation(0),
499 line_number(0) { 499 line_number(0) {
500 } 500 }
501 501
502 } // namespace gpu 502 } // namespace gpu
503 503
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_x11.cc ('k') | gpu/tools/compositor_model_bench/render_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698