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

Side by Side Diff: shell/child_process_host.cc

Issue 1045893004: Remove is_win/OS_WIN checks in shell code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « shell/application_manager/local_fetcher.cc ('k') | shell/command_line_util.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "shell/child_process_host.h" 5 #include "shell/child_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 child_command_line.CopySwitchesFrom(*parent_command_line, kForwardSwitches, 68 child_command_line.CopySwitchesFrom(*parent_command_line, kForwardSwitches,
69 arraysize(kForwardSwitches)); 69 arraysize(kForwardSwitches));
70 child_command_line.AppendSwitchASCII( 70 child_command_line.AppendSwitchASCII(
71 switches::kChildProcessType, base::IntToString(static_cast<int>(type_))); 71 switches::kChildProcessType, base::IntToString(static_cast<int>(type_)));
72 72
73 embedder::HandlePassingInformation handle_passing_info; 73 embedder::HandlePassingInformation handle_passing_info;
74 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( 74 platform_channel_pair_.PrepareToPassClientHandleToChildProcess(
75 &child_command_line, &handle_passing_info); 75 &child_command_line, &handle_passing_info);
76 76
77 base::LaunchOptions options; 77 base::LaunchOptions options;
78 #if defined(OS_WIN)
79 options.start_hidden = true;
80 options.handles_to_inherit = &handle_passing_info;
81 #elif defined(OS_POSIX)
82 options.fds_to_remap = &handle_passing_info; 78 options.fds_to_remap = &handle_passing_info;
83 #endif
84 child_process_ = base::LaunchProcess(child_command_line, options); 79 child_process_ = base::LaunchProcess(child_command_line, options);
85 if (!child_process_.IsValid()) 80 if (!child_process_.IsValid())
86 return false; 81 return false;
87 82
88 platform_channel_pair_.ChildProcessLaunched(); 83 platform_channel_pair_.ChildProcessLaunched();
89 return true; 84 return true;
90 } 85 }
91 86
92 void ChildProcessHost::DidLaunch(bool success) { 87 void ChildProcessHost::DidLaunch(bool success) {
93 delegate_->DidStart(success); 88 delegate_->DidStart(success);
94 } 89 }
95 90
96 } // namespace shell 91 } // namespace shell
97 } // namespace mojo 92 } // namespace mojo
OLDNEW
« no previous file with comments | « shell/application_manager/local_fetcher.cc ('k') | shell/command_line_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698