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

Side by Side Diff: base/test/launcher/test_results_tracker.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « base/path_service.cc ('k') | cc/test/pixel_test_utils.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/test/launcher/test_results_tracker.h" 5 #include "base/test/launcher/test_results_tracker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 FilePath::StringType(FILE_PATH_LITERAL("xml")))); 123 FilePath::StringType(FILE_PATH_LITERAL("xml"))));
124 } 124 }
125 } 125 }
126 if (path.value().empty()) 126 if (path.value().empty())
127 path = FilePath(kDefaultOutputFile); 127 path = FilePath(kDefaultOutputFile);
128 FilePath dir_name = path.DirName(); 128 FilePath dir_name = path.DirName();
129 if (!DirectoryExists(dir_name)) { 129 if (!DirectoryExists(dir_name)) {
130 LOG(WARNING) << "The output directory does not exist. " 130 LOG(WARNING) << "The output directory does not exist. "
131 << "Creating the directory: " << dir_name.value(); 131 << "Creating the directory: " << dir_name.value();
132 // Create the directory if necessary (because the gtest does the same). 132 // Create the directory if necessary (because the gtest does the same).
133 if (!file_util::CreateDirectory(dir_name)) { 133 if (!base::CreateDirectory(dir_name)) {
134 LOG(ERROR) << "Failed to created directory " << dir_name.value(); 134 LOG(ERROR) << "Failed to created directory " << dir_name.value();
135 return false; 135 return false;
136 } 136 }
137 } 137 }
138 out_ = file_util::OpenFile(path, "w"); 138 out_ = file_util::OpenFile(path, "w");
139 if (!out_) { 139 if (!out_) {
140 LOG(ERROR) << "Cannot open output file: " 140 LOG(ERROR) << "Cannot open output file: "
141 << path.value() << "."; 141 << path.value() << ".";
142 return false; 142 return false;
143 } 143 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 TestResultsTracker::AggregateTestResult::~AggregateTestResult() { 289 TestResultsTracker::AggregateTestResult::~AggregateTestResult() {
290 } 290 }
291 291
292 TestResultsTracker::PerIterationData::PerIterationData() { 292 TestResultsTracker::PerIterationData::PerIterationData() {
293 } 293 }
294 294
295 TestResultsTracker::PerIterationData::~PerIterationData() { 295 TestResultsTracker::PerIterationData::~PerIterationData() {
296 } 296 }
297 297
298 } // namespace base 298 } // namespace base
OLDNEW
« no previous file with comments | « base/path_service.cc ('k') | cc/test/pixel_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698