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

Side by Side Diff: mojo/shell/child_process_host.cc

Issue 292743017: Cleanup: Use base::CommandLine in mojo/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « mojo/shell/child_process.cc ('k') | mojo/shell/context.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 "mojo/shell/child_process_host.h" 5 #include "mojo/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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return rv; 63 return rv;
64 } 64 }
65 65
66 bool ChildProcessHost::DoLaunch() { 66 bool ChildProcessHost::DoLaunch() {
67 static const char* kForwardSwitches[] = { 67 static const char* kForwardSwitches[] = {
68 switches::kTraceToConsole, 68 switches::kTraceToConsole,
69 switches::kV, 69 switches::kV,
70 switches::kVModule, 70 switches::kVModule,
71 }; 71 };
72 72
73 const CommandLine* parent_command_line = CommandLine::ForCurrentProcess(); 73 const base::CommandLine* parent_command_line =
74 CommandLine child_command_line(parent_command_line->GetProgram()); 74 base::CommandLine::ForCurrentProcess();
75 base::CommandLine child_command_line(parent_command_line->GetProgram());
75 child_command_line.CopySwitchesFrom(*parent_command_line, kForwardSwitches, 76 child_command_line.CopySwitchesFrom(*parent_command_line, kForwardSwitches,
76 arraysize(kForwardSwitches)); 77 arraysize(kForwardSwitches));
77 child_command_line.AppendSwitchASCII( 78 child_command_line.AppendSwitchASCII(
78 switches::kChildProcessType, base::IntToString(static_cast<int>(type_))); 79 switches::kChildProcessType, base::IntToString(static_cast<int>(type_)));
79 80
80 embedder::HandlePassingInformation handle_passing_info; 81 embedder::HandlePassingInformation handle_passing_info;
81 platform_channel_pair_.PrepareToPassClientHandleToChildProcess( 82 platform_channel_pair_.PrepareToPassClientHandleToChildProcess(
82 &child_command_line, &handle_passing_info); 83 &child_command_line, &handle_passing_info);
83 84
84 base::LaunchOptions options; 85 base::LaunchOptions options;
(...skipping 10 matching lines...) Expand all
95 platform_channel_pair_.ChildProcessLaunched(); 96 platform_channel_pair_.ChildProcessLaunched();
96 return true; 97 return true;
97 } 98 }
98 99
99 void ChildProcessHost::DidLaunch(bool success) { 100 void ChildProcessHost::DidLaunch(bool success) {
100 delegate_->DidStart(success); 101 delegate_->DidStart(success);
101 } 102 }
102 103
103 } // namespace shell 104 } // namespace shell
104 } // namespace mojo 105 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/child_process.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698