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

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

Issue 2412113002: Use SharedPersistentMemoryAllocator to share field trial state (Closed)
Patch Set: move field_trial_allocator into anon namespace 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, cmd_line, 76 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, cmd_line,
77 nullptr, true); 77 true);
78 return true; 78 return true;
79 } 79 }
80 80
81 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { 81 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) {
82 bool handled = true; 82 bool handled = true;
83 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) 83 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg)
84 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) 84 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched)
85 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched, 85 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched,
86 OnDebugExceptionHandlerLaunched) 86 OnDebugExceptionHandlerLaunched)
87 IPC_MESSAGE_UNHANDLED(handled = false) 87 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, 119 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid,
120 success); 120 success);
121 } 121 }
122 122
123 void NaClBrokerHost::StopBroker() { 123 void NaClBrokerHost::StopBroker() {
124 is_terminating_ = true; 124 is_terminating_ = true;
125 process_->Send(new NaClProcessMsg_StopBroker()); 125 process_->Send(new NaClProcessMsg_StopBroker());
126 } 126 }
127 127
128 } // namespace nacl 128 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698