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

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

Issue 2365273004: Initial implementation for sharing field trial state (win) (Closed)
Patch Set: rebase + gclient sync Created 4 years, 2 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 | « base/metrics/field_trial_unittest.cc ('k') | 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 "base/macros.h" 9 #include "base/macros.h"
10 #include "components/nacl/browser/nacl_broker_service_win.h" 10 #include "components/nacl/browser/nacl_broker_service_win.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 base::CommandLine* cmd_line = new base::CommandLine(nacl_path); 67 base::CommandLine* cmd_line = new base::CommandLine(nacl_path);
68 CopyNaClCommandLineArguments(cmd_line); 68 CopyNaClCommandLineArguments(cmd_line);
69 69
70 cmd_line->AppendSwitchASCII(switches::kProcessType, 70 cmd_line->AppendSwitchASCII(switches::kProcessType,
71 switches::kNaClBrokerProcess); 71 switches::kNaClBrokerProcess);
72 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); 72 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token);
73 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) 73 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed())
74 cmd_line->AppendSwitch(switches::kNoErrorDialogs); 74 cmd_line->AppendSwitch(switches::kNoErrorDialogs);
75 75
76 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, 76 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, cmd_line,
77 cmd_line, 77 nullptr, true);
78 true);
79 return true; 78 return true;
80 } 79 }
81 80
82 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { 81 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) {
83 bool handled = true; 82 bool handled = true;
84 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) 83 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg)
85 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) 84 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched)
86 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched, 85 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched,
87 OnDebugExceptionHandlerLaunched) 86 OnDebugExceptionHandlerLaunched)
88 IPC_MESSAGE_UNHANDLED(handled = false) 87 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, 119 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid,
121 success); 120 success);
122 } 121 }
123 122
124 void NaClBrokerHost::StopBroker() { 123 void NaClBrokerHost::StopBroker() {
125 is_terminating_ = true; 124 is_terminating_ = true;
126 process_->Send(new NaClProcessMsg_StopBroker()); 125 process_->Send(new NaClProcessMsg_StopBroker());
127 } 126 }
128 127
129 } // namespace nacl 128 } // namespace nacl
OLDNEW
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698