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

Unified Diff: base/test/multiprocess_test.cc

Issue 3035062: Revert 55400 - Cleanup in base. This moves the implementation (and a bunch of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/multiprocess_test.h ('k') | base/test/perf_test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/multiprocess_test.cc
===================================================================
--- base/test/multiprocess_test.cc (revision 55415)
+++ base/test/multiprocess_test.cc (working copy)
@@ -1,74 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/test/multiprocess_test.h"
-
-#include "base/base_switches.h"
-#include "base/command_line.h"
-
-#if defined(OS_POSIX)
-#include <sys/types.h>
-#include <unistd.h>
-#endif
-
-namespace base {
-
-MultiProcessTest::MultiProcessTest() {
-}
-
-ProcessHandle MultiProcessTest::SpawnChild(const std::string& procname,
- bool debug_on_start) {
-#if defined(OS_WIN)
- return SpawnChildImpl(procname, debug_on_start);
-#elif defined(OS_POSIX)
- file_handle_mapping_vector empty_file_list;
- return SpawnChildImpl(procname, empty_file_list, debug_on_start);
-#endif
-}
-
-#if defined(OS_POSIX)
-ProcessHandle MultiProcessTest::SpawnChild(
- const std::string& procname,
- const file_handle_mapping_vector& fds_to_map,
- bool debug_on_start) {
- return SpawnChildImpl(procname, fds_to_map, debug_on_start);
-}
-#endif
-
-CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname,
- bool debug_on_start) {
- CommandLine cl(*CommandLine::ForCurrentProcess());
- cl.AppendSwitchASCII(switches::kTestChildProcess, procname);
- if (debug_on_start)
- cl.AppendSwitch(switches::kDebugOnStart);
- return cl;
-}
-
-#if defined(OS_WIN)
-
-ProcessHandle MultiProcessTest::SpawnChildImpl(const std::string& procname,
- bool debug_on_start) {
- ProcessHandle handle = static_cast<ProcessHandle>(NULL);
- LaunchApp(MakeCmdLine(procname, debug_on_start),
- false, true, &handle);
- return handle;
-}
-
-#elif defined(OS_POSIX)
-
-// TODO(port): with the CommandLine refactoring, this code is very similar
-// to the Windows code. Investigate whether this can be made shorter.
-ProcessHandle MultiProcessTest::SpawnChildImpl(
- const std::string& procname,
- const file_handle_mapping_vector& fds_to_map,
- bool debug_on_start) {
- ProcessHandle handle = kNullProcessHandle;
- LaunchApp(MakeCmdLine(procname, debug_on_start).argv(),
- fds_to_map, false, &handle);
- return handle;
-}
-
-#endif
-
-} // namespace base
« no previous file with comments | « base/test/multiprocess_test.h ('k') | base/test/perf_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698