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

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

Issue 99923002: Move temp file 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/memory/shared_memory_posix.cc ('k') | base/test/launcher/unit_test_launcher.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_launcher.h" 5 #include "base/test/launcher/test_launcher.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #endif 9 #endif
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 void DoLaunchChildTestProcess( 241 void DoLaunchChildTestProcess(
242 const CommandLine& command_line, 242 const CommandLine& command_line,
243 base::TimeDelta timeout, 243 base::TimeDelta timeout,
244 bool redirect_stdio, 244 bool redirect_stdio,
245 scoped_refptr<MessageLoopProxy> message_loop_proxy, 245 scoped_refptr<MessageLoopProxy> message_loop_proxy,
246 const TestLauncher::LaunchChildGTestProcessCallback& callback) { 246 const TestLauncher::LaunchChildGTestProcessCallback& callback) {
247 TimeTicks start_time = TimeTicks::Now(); 247 TimeTicks start_time = TimeTicks::Now();
248 248
249 // Redirect child process output to a file. 249 // Redirect child process output to a file.
250 base::FilePath output_file; 250 base::FilePath output_file;
251 CHECK(file_util::CreateTemporaryFile(&output_file)); 251 CHECK(base::CreateTemporaryFile(&output_file));
252 252
253 LaunchOptions options; 253 LaunchOptions options;
254 #if defined(OS_WIN) 254 #if defined(OS_WIN)
255 win::ScopedHandle handle; 255 win::ScopedHandle handle;
256 256
257 if (redirect_stdio) { 257 if (redirect_stdio) {
258 // Make the file handle inheritable by the child. 258 // Make the file handle inheritable by the child.
259 SECURITY_ATTRIBUTES sa_attr; 259 SECURITY_ATTRIBUTES sa_attr;
260 sa_attr.nLength = sizeof(SECURITY_ATTRIBUTES); 260 sa_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
261 sa_attr.lpSecurityDescriptor = NULL; 261 sa_attr.lpSecurityDescriptor = NULL;
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 987
988 g_live_processes.Get().erase(process_handle); 988 g_live_processes.Get().erase(process_handle);
989 } 989 }
990 990
991 base::CloseProcessHandle(process_handle); 991 base::CloseProcessHandle(process_handle);
992 992
993 return exit_code; 993 return exit_code;
994 } 994 }
995 995
996 } // namespace base 996 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/shared_memory_posix.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698