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

Unified Diff: chrome/service/service_process.cc

Issue 2084453002: Initialise and use ChannelMojo to the service utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 6 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
« no previous file with comments | « chrome/service/service_process.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index dba9f442b06bc43052420897a680e4a52418729a..bea34bb8783206f4345369216e18ec5315343244 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -38,6 +38,8 @@
#include "chrome/service/service_process_prefs.h"
#include "components/network_session_configurator/switches.h"
#include "components/prefs/json_pref_store.h"
+#include "mojo/edk/embedder/embedder.h"
+#include "mojo/edk/embedder/scoped_ipc_support.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_fetcher.h"
#include "ui/base/l10n/l10n_util.h"
@@ -154,6 +156,11 @@ bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop,
}
blocking_pool_ = new base::SequencedWorkerPool(3, "ServiceBlocking");
+ // Initialize Mojo early so things can use it.
+ mojo::edk::Init();
+ mojo_ipc_support_.reset(
+ new mojo::edk::ScopedIPCSupport(io_thread_->task_runner()));
+
request_context_getter_ = new ServiceURLRequestContextGetter();
base::FilePath user_data_dir;
@@ -225,6 +232,7 @@ bool ServiceProcess::Teardown() {
service_prefs_.reset();
cloud_print_proxy_.reset();
+ mojo_ipc_support_.reset();
ipc_server_.reset();
// Signal this event before shutting down the service process. That way all
// background threads can cleanup.
« no previous file with comments | « chrome/service/service_process.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698