OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef BASE_TEST_MULTIPROCESS_TEST_H_ | 5 #ifndef BASE_TEST_MULTIPROCESS_TEST_H_ |
6 #define BASE_TEST_MULTIPROCESS_TEST_H_ | 6 #define BASE_TEST_MULTIPROCESS_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // } | 55 // } |
56 // | 56 // |
57 // Returns the handle to the child, or NULL on failure | 57 // Returns the handle to the child, or NULL on failure |
58 ProcessHandle SpawnChild(const std::string& procname, bool debug_on_start); | 58 ProcessHandle SpawnChild(const std::string& procname, bool debug_on_start); |
59 | 59 |
60 #if defined(OS_POSIX) | 60 #if defined(OS_POSIX) |
61 // TODO(evan): see if we can delete this via more refactoring. | 61 // TODO(evan): see if we can delete this via more refactoring. |
62 // SpawnChild() should just take a base::LaunchOptions so that we don't | 62 // SpawnChild() should just take a base::LaunchOptions so that we don't |
63 // need multiple versions of it. | 63 // need multiple versions of it. |
64 ProcessHandle SpawnChild(const std::string& procname, | 64 ProcessHandle SpawnChild(const std::string& procname, |
65 const file_handle_mapping_vector& fds_to_map, | 65 const FileHandleMappingVector& fds_to_map, |
66 bool debug_on_start); | 66 bool debug_on_start); |
67 #endif | 67 #endif |
68 | 68 |
69 // Set up the command line used to spawn the child process. | 69 // Set up the command line used to spawn the child process. |
70 virtual CommandLine MakeCmdLine(const std::string& procname, | 70 virtual CommandLine MakeCmdLine(const std::string& procname, |
71 bool debug_on_start); | 71 bool debug_on_start); |
72 | 72 |
73 private: | 73 private: |
74 // Shared implementation of SpawnChild. | 74 // Shared implementation of SpawnChild. |
75 // TODO: |fds_to_map| is unused on Windows; see above TODO about | 75 // TODO: |fds_to_map| is unused on Windows; see above TODO about |
76 // further refactoring. | 76 // further refactoring. |
77 ProcessHandle SpawnChildImpl(const std::string& procname, | 77 ProcessHandle SpawnChildImpl(const std::string& procname, |
78 const file_handle_mapping_vector& fds_to_map, | 78 const FileHandleMappingVector& fds_to_map, |
79 bool debug_on_start); | 79 bool debug_on_start); |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); | 81 DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace base | 84 } // namespace base |
85 | 85 |
86 #endif // BASE_TEST_MULTIPROCESS_TEST_H_ | 86 #endif // BASE_TEST_MULTIPROCESS_TEST_H_ |
OLD | NEW |