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

Side by Side Diff: base/test/multiprocess_test.cc

Issue 10408081: Provide android specific implementation for MultiProcessTest::SpawnChildImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « base/base.gyp ('k') | base/test/multiprocess_test_android.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 "base/test/multiprocess_test.h" 5 #include "base/test/multiprocess_test.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 18 matching lines...) Expand all
29 29
30 CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname, 30 CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname,
31 bool debug_on_start) { 31 bool debug_on_start) {
32 CommandLine cl(*CommandLine::ForCurrentProcess()); 32 CommandLine cl(*CommandLine::ForCurrentProcess());
33 cl.AppendSwitchASCII(switches::kTestChildProcess, procname); 33 cl.AppendSwitchASCII(switches::kTestChildProcess, procname);
34 if (debug_on_start) 34 if (debug_on_start)
35 cl.AppendSwitch(switches::kDebugOnStart); 35 cl.AppendSwitch(switches::kDebugOnStart);
36 return cl; 36 return cl;
37 } 37 }
38 38
39 #if !defined(OS_ANDROID)
39 ProcessHandle MultiProcessTest::SpawnChildImpl( 40 ProcessHandle MultiProcessTest::SpawnChildImpl(
40 const std::string& procname, 41 const std::string& procname,
41 const FileHandleMappingVector& fds_to_map, 42 const FileHandleMappingVector& fds_to_map,
42 bool debug_on_start) { 43 bool debug_on_start) {
43 ProcessHandle handle = kNullProcessHandle; 44 ProcessHandle handle = kNullProcessHandle;
44 base::LaunchOptions options; 45 base::LaunchOptions options;
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 options.start_hidden = true; 47 options.start_hidden = true;
47 #else 48 #else
48 options.fds_to_remap = &fds_to_map; 49 options.fds_to_remap = &fds_to_map;
49 #endif 50 #endif
50 base::LaunchProcess(MakeCmdLine(procname, debug_on_start), options, &handle); 51 base::LaunchProcess(MakeCmdLine(procname, debug_on_start), options, &handle);
51 return handle; 52 return handle;
52 } 53 }
54 #endif // !defined(OS_ANDROID)
53 55
54 } // namespace base 56 } // namespace base
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | base/test/multiprocess_test_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698