OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #endif | 62 #endif |
63 | 63 |
64 base::CommandLine child_command_line(target_path); | 64 base::CommandLine child_command_line(target_path); |
65 // Forward the wait-for-debugger flag but nothing else - we don't want to | 65 // Forward the wait-for-debugger flag but nothing else - we don't want to |
66 // stamp on the platform-channel flag. | 66 // stamp on the platform-channel flag. |
67 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 67 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
68 switches::kWaitForDebugger)) { | 68 switches::kWaitForDebugger)) { |
69 child_command_line.AppendSwitch(switches::kWaitForDebugger); | 69 child_command_line.AppendSwitch(switches::kWaitForDebugger); |
70 } | 70 } |
71 | 71 |
72 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")); | |
73 child_command_line.AppendSwitch("use-new-edk"); | |
74 | |
75 mojo::shell::mojom::PIDReceiverPtr receiver; | 72 mojo::shell::mojom::PIDReceiverPtr receiver; |
76 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request = | 73 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request = |
77 GetProxy(&receiver); | 74 GetProxy(&receiver); |
78 | 75 |
79 // Create the channel to be shared with the target process. Pass one end | 76 // Create the channel to be shared with the target process. Pass one end |
80 // on the command line. | 77 // on the command line. |
81 mojo::edk::PlatformChannelPair platform_channel_pair; | 78 mojo::edk::PlatformChannelPair platform_channel_pair; |
82 mojo::edk::HandlePassingInformation handle_passing_info; | 79 mojo::edk::HandlePassingInformation handle_passing_info; |
83 platform_channel_pair.PrepareToPassClientHandleToChildProcess( | 80 platform_channel_pair.PrepareToPassClientHandleToChildProcess( |
84 &child_command_line, &handle_passing_info); | 81 &child_command_line, &handle_passing_info); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 147 |
151 int main(int argc, char** argv) { | 148 int main(int argc, char** argv) { |
152 base::AtExitManager at_exit; | 149 base::AtExitManager at_exit; |
153 base::CommandLine::Init(argc, argv); | 150 base::CommandLine::Init(argc, argv); |
154 | 151 |
155 mojo::shell::InitializeLogging(); | 152 mojo::shell::InitializeLogging(); |
156 | 153 |
157 TargetApplicationDelegate delegate; | 154 TargetApplicationDelegate delegate; |
158 return mojo::shell::TestNativeMain(&delegate); | 155 return mojo::shell::TestNativeMain(&delegate); |
159 } | 156 } |
OLD | NEW |