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

Unified Diff: components/nacl/browser/nacl_broker_host_win.cc

Issue 2501913002: Change the NaCl loader and broker processes to use the ServiceManager. (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/broker/nacl_broker_manifest.json ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_broker_host_win.cc
diff --git a/components/nacl/browser/nacl_broker_host_win.cc b/components/nacl/browser/nacl_broker_host_win.cc
index 4b2e9a02043c72037e7364e9e23bbd7b857fdeee..fb6cd81b1a95f69cd78cca98dd8354644e87f8f2 100644
--- a/components/nacl/browser/nacl_broker_host_win.cc
+++ b/components/nacl/browser/nacl_broker_host_win.cc
@@ -10,6 +10,7 @@
#include "components/nacl/browser/nacl_broker_service_win.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/common/nacl_cmd_line.h"
+#include "components/nacl/common/nacl_constants.h"
#include "components/nacl/common/nacl_messages.h"
#include "components/nacl/common/nacl_process_type.h"
#include "components/nacl/common/nacl_switches.h"
@@ -47,17 +48,12 @@ NaClBrokerHost::~NaClBrokerHost() {
}
bool NaClBrokerHost::Init() {
- const std::string mojo_child_token = mojo::edk::GenerateRandomToken();
DCHECK(!process_);
process_.reset(content::BrowserChildProcessHost::Create(
static_cast<content::ProcessType>(PROCESS_TYPE_NACL_BROKER), this,
- mojo_child_token));
+ kNaClBrokerServiceName));
- // Create the channel that will be used for communicating with the broker.
- const std::string mojo_channel_token =
- process_->GetHost()->CreateChannelMojo(mojo_child_token);
- if (mojo_channel_token.empty())
- return false;
+ process_->GetHost()->CreateChannelMojo();
// Create the path to the nacl broker/loader executable.
base::FilePath nacl_path;
@@ -69,7 +65,6 @@ bool NaClBrokerHost::Init() {
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kNaClBrokerProcess);
- cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token);
if (NaClBrowser::GetDelegate()->DialogsAreSuppressed())
cmd_line->AppendSwitch(switches::kNoErrorDialogs);
« no previous file with comments | « components/nacl/broker/nacl_broker_manifest.json ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698