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

Side by Side Diff: components/nacl/browser/nacl_broker_host_win.cc

Issue 1022703007: Simplify ChildProcessLauncher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher
Patch Set: default arg, rebase 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 | « no previous file | components/nacl/browser/nacl_process_host.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_broker_host_win.h" 5 #include "components/nacl/browser/nacl_broker_host_win.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 "components/nacl/browser/nacl_broker_service_win.h" 9 #include "components/nacl/browser/nacl_broker_service_win.h"
10 #include "components/nacl/browser/nacl_browser.h" 10 #include "components/nacl/browser/nacl_browser.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 base::CommandLine* cmd_line = new base::CommandLine(nacl_path); 60 base::CommandLine* cmd_line = new base::CommandLine(nacl_path);
61 CopyNaClCommandLineArguments(cmd_line); 61 CopyNaClCommandLineArguments(cmd_line);
62 62
63 cmd_line->AppendSwitchASCII(switches::kProcessType, 63 cmd_line->AppendSwitchASCII(switches::kProcessType,
64 switches::kNaClBrokerProcess); 64 switches::kNaClBrokerProcess);
65 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 65 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
66 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) 66 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed())
67 cmd_line->AppendSwitch(switches::kNoErrorDialogs); 67 cmd_line->AppendSwitch(switches::kNoErrorDialogs);
68 68
69 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, 69 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate,
70 cmd_line); 70 cmd_line,
71 true);
71 return true; 72 return true;
72 } 73 }
73 74
74 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { 75 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) {
75 bool handled = true; 76 bool handled = true;
76 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) 77 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg)
77 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) 78 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched)
78 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched, 79 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched,
79 OnDebugExceptionHandlerLaunched) 80 OnDebugExceptionHandlerLaunched)
80 IPC_MESSAGE_UNHANDLED(handled = false) 81 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 28 matching lines...) Expand all
109 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, 110 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid,
110 success); 111 success);
111 } 112 }
112 113
113 void NaClBrokerHost::StopBroker() { 114 void NaClBrokerHost::StopBroker() {
114 is_terminating_ = true; 115 is_terminating_ = true;
115 process_->Send(new NaClProcessMsg_StopBroker()); 116 process_->Send(new NaClProcessMsg_StopBroker());
116 } 117 }
117 118
118 } // namespace nacl 119 } // namespace nacl
OLDNEW
« no previous file with comments | « no previous file | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698