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

Side by Side Diff: base/multiprocess_test.h

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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/gfx/platform_canvas_win.cc ('k') | base/process.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_MULTIPROCESS_TEST_H__ 5 #ifndef BASE_MULTIPROCESS_TEST_H__
6 #define BASE_MULTIPROCESS_TEST_H__ 6 #define BASE_MULTIPROCESS_TEST_H__
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/platform_test.h" 9 #include "base/platform_test.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 // Example signature: 45 // Example signature:
46 // extern "C" int __declspec(dllexport) FooBar() { 46 // extern "C" int __declspec(dllexport) FooBar() {
47 // // do client work here 47 // // do client work here
48 // } 48 // }
49 // 49 //
50 // Returns the handle to the child, or NULL on failure 50 // Returns the handle to the child, or NULL on failure
51 // 51 //
52 // TODO(darin): re-enable this once we have base/debug_util.h 52 // TODO(darin): re-enable this once we have base/debug_util.h
53 // ProcessDebugFlags(&cl, DebugUtil::UNKNOWN, false); 53 // ProcessDebugFlags(&cl, DebugUtil::UNKNOWN, false);
54 ProcessHandle SpawnChild(const std::wstring& procname) { 54 base::ProcessHandle SpawnChild(const std::wstring& procname) {
55 CommandLine cl; 55 CommandLine cl;
56 ProcessHandle handle = static_cast<ProcessHandle>(NULL); 56 base::ProcessHandle handle = static_cast<base::ProcessHandle>(NULL);
57 57
58 #if defined(OS_WIN) 58 #if defined(OS_WIN)
59 std::wstring clstr = cl.command_line_string(); 59 std::wstring clstr = cl.command_line_string();
60 CommandLine::AppendSwitchWithValue(&clstr, kRunClientProcess, procname); 60 CommandLine::AppendSwitchWithValue(&clstr, kRunClientProcess, procname);
61 process_util::LaunchApp(clstr, false, true, &handle); 61 base::LaunchApp(clstr, false, true, &handle);
62 #elif defined(OS_POSIX) 62 #elif defined(OS_POSIX)
63 std::vector<std::string> clvec(cl.argv()); 63 std::vector<std::string> clvec(cl.argv());
64 std::wstring wswitchstr = 64 std::wstring wswitchstr =
65 CommandLine::PrefixedSwitchStringWithValue(kRunClientProcess, 65 CommandLine::PrefixedSwitchStringWithValue(kRunClientProcess,
66 procname); 66 procname);
67 std::string switchstr = WideToUTF8(wswitchstr); 67 std::string switchstr = WideToUTF8(wswitchstr);
68 clvec.push_back(switchstr.c_str()); 68 clvec.push_back(switchstr.c_str());
69 process_util::LaunchApp(clvec, false, &handle); 69 base::LaunchApp(clvec, false, &handle);
70 #endif 70 #endif
71 71
72 return handle; 72 return handle;
73 } 73 }
74 }; 74 };
75 75
76 #endif // BASE_MULTIPROCESS_TEST_H__ 76 #endif // BASE_MULTIPROCESS_TEST_H__
OLDNEW
« no previous file with comments | « base/gfx/platform_canvas_win.cc ('k') | base/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698