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

Unified Diff: mojo/shell/context.cc

Issue 522443003: Accept inbound connections on unix domain socket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug407782
Patch Set: Fix clang style complaints Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 64db00b05a5023a766b05de76b2da85ca67c6408..d87a8f0c96e82248a11c019de1775fd403e4777b 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/command_line.h"
+#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -22,6 +23,7 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/shell/dynamic_application_loader.h"
+#include "mojo/shell/external_application_listener.h"
#include "mojo/shell/in_process_dynamic_service_runner.h"
#include "mojo/shell/out_of_process_dynamic_service_runner.h"
#include "mojo/shell/switches.h"
@@ -176,6 +178,12 @@ void Context::Init() {
for (size_t i = 0; i < arraysize(kLocalMojoURLs); ++i)
mojo_url_resolver_.AddLocalFileMapping(GURL(kLocalMojoURLs[i]));
+ listener_.reset(new ExternalApplicationListener(task_runners_->shell_runner(),
+ task_runners_->io_runner()));
+ listener_->ListenInBackground(
+ base::FilePath(ExternalApplicationListener::kDefaultListenSocketPath),
+ base::Bind(&ApplicationManager::RegisterExternalApplication,
+ base::Unretained(&application_manager_)));
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
scoped_ptr<DynamicServiceRunnerFactory> runner_factory;

Powered by Google App Engine
This is Rietveld 408576698