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

Unified Diff: services/service_manager/standalone/context.cc

Issue 2620633004: Remove mojo::edk::test::ScopedIPCSupport (Closed)
Patch Set: . Created 3 years, 11 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 | « services/service_manager/standalone/context.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/standalone/context.cc
diff --git a/services/service_manager/standalone/context.cc b/services/service_manager/standalone/context.cc
index 4ab116c0881b35a67bee39e54e597ae8cd56a7a6..469af658b727ddc0e593684b2fc23e3fafca9823 100644
--- a/services/service_manager/standalone/context.cc
+++ b/services/service_manager/standalone/context.cc
@@ -149,7 +149,7 @@ void Context::Init(std::unique_ptr<InitParams> init_params) {
init_edk_ = !init_params || init_params->init_edk;
if (init_edk_) {
- mojo::edk::InitIPCSupport(this, io_thread_->task_runner().get());
+ mojo::edk::InitIPCSupport(io_thread_->task_runner().get());
#if defined(OS_MACOSX)
mojo::edk::SetMachPortProvider(MachBroker::GetInstance()->port_provider());
#endif
@@ -243,9 +243,11 @@ void Context::Shutdown() {
return;
TRACE_EVENT0("service_manager", "Context::Shutdown");
- // Post a task in case OnShutdownComplete is called synchronously.
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(mojo::edk::ShutdownIPCSupport));
+ mojo::edk::ShutdownIPCSupport(
+ base::Bind(IgnoreResult(&base::TaskRunner::PostTask),
+ base::ThreadTaskRunnerHandle::Get(), FROM_HERE,
+ base::Bind(&Context::OnShutdownComplete,
+ base::Unretained(this))));
// We'll quit when we get OnShutdownComplete().
base::RunLoop().Run();
}
« no previous file with comments | « services/service_manager/standalone/context.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698