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 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" | 5 #include "chrome/browser/importer/firefox_importer_unittest_utils.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 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } else { | 50 } else { |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 bool debug_on_start = CommandLine::ForCurrentProcess()->HasSwitch( | 54 bool debug_on_start = CommandLine::ForCurrentProcess()->HasSwitch( |
55 switches::kDebugChildren); | 55 switches::kDebugChildren); |
56 base::LaunchOptions options; | 56 base::LaunchOptions options; |
57 options.environ = &env; | 57 options.environ = &env; |
58 options.fds_to_remap = &fds_to_map; | 58 options.fds_to_remap = &fds_to_map; |
59 options.wait = debug_on_start; | 59 options.wait = debug_on_start; |
60 options.process_handle = handle; | 60 return base::LaunchProcess(cl.argv(), options, handle); |
61 return base::LaunchProcess(cl.argv(), options); | |
62 } | 61 } |
63 | 62 |
64 } // namespace | 63 } // namespace |
65 | 64 |
66 //----------------------- Server -------------------- | 65 //----------------------- Server -------------------- |
67 | 66 |
68 // Class to communicate on the server side of the IPC Channel. | 67 // Class to communicate on the server side of the IPC Channel. |
69 // Method calls are sent over IPC and replies are read back into class | 68 // Method calls are sent over IPC and replies are read back into class |
70 // variables. | 69 // variables. |
71 // This class needs to be called on a single thread. | 70 // This class needs to be called on a single thread. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 263 |
265 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); | 264 IPC::Channel channel(kTestChannelID, IPC::Channel::MODE_CLIENT, &listener); |
266 CHECK(channel.Connect()); | 265 CHECK(channel.Connect()); |
267 listener.SetSender(&channel); | 266 listener.SetSender(&channel); |
268 | 267 |
269 // run message loop | 268 // run message loop |
270 MessageLoop::current()->Run(); | 269 MessageLoop::current()->Run(); |
271 | 270 |
272 return 0; | 271 return 0; |
273 } | 272 } |
OLD | NEW |