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

Unified Diff: ipc/mojo/scoped_ipc_support.cc

Issue 2074453003: Move ScopedIPCSupport to mojo/edk/embedder and the mojo::edk namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « ipc/mojo/scoped_ipc_support.h ('k') | mojo/edk/embedder/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/scoped_ipc_support.cc
diff --git a/ipc/mojo/scoped_ipc_support.cc b/ipc/mojo/scoped_ipc_support.cc
deleted file mode 100644
index 65947bece9c4597af2460e56da7f26c20c451ddb..0000000000000000000000000000000000000000
--- a/ipc/mojo/scoped_ipc_support.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ipc/mojo/scoped_ipc_support.h"
-
-#include "base/lazy_instance.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "mojo/edk/embedder/embedder.h"
-#include "mojo/edk/embedder/process_delegate.h"
-
-namespace IPC {
-
-namespace {
-class IPCSupportInitializer : public mojo::edk::ProcessDelegate {
- public:
- IPCSupportInitializer() {}
- ~IPCSupportInitializer() override {}
-
- void Init(scoped_refptr<base::TaskRunner> io_thread_task_runner) {
- CHECK(!io_thread_task_runner_);
- CHECK(io_thread_task_runner);
- io_thread_task_runner_ = io_thread_task_runner;
-
- mojo::edk::InitIPCSupport(this, io_thread_task_runner_);
- }
-
- void ShutDown() {
- CHECK(io_thread_task_runner_);
- mojo::edk::ShutdownIPCSupport();
- }
-
- private:
- // mojo::edk::ProcessDelegate:
- void OnShutdownComplete() override {
- // TODO(rockot): We should ensure that IO runner shutdown is blocked until
- // this is called.
- }
-
- scoped_refptr<base::TaskRunner> io_thread_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(IPCSupportInitializer);
-};
-
-base::LazyInstance<IPCSupportInitializer>::Leaky ipc_support_initializer;
-
-} // namespace
-
-ScopedIPCSupport::ScopedIPCSupport(
- scoped_refptr<base::TaskRunner> io_thread_task_runner) {
- ipc_support_initializer.Get().Init(io_thread_task_runner);
-}
-
-ScopedIPCSupport::~ScopedIPCSupport() {
- ipc_support_initializer.Get().ShutDown();
-}
-
-} // namespace IPC
« no previous file with comments | « ipc/mojo/scoped_ipc_support.h ('k') | mojo/edk/embedder/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698