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

Unified Diff: chrome/browser/chromeos/dbus_thread_manager_chrome.cc

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome Created 4 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
« no previous file with comments | « chrome/browser/chromeos/dbus_thread_manager_chrome.h ('k') | chrome/browser/chromeos/system_logs/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus_thread_manager_chrome.cc
diff --git a/chrome/browser/chromeos/dbus_thread_manager_chrome.cc b/chrome/browser/chromeos/dbus_thread_manager_chrome.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5f0fd885052b9b5e0a6a35ea17aec204edebd62a
--- /dev/null
+++ b/chrome/browser/chromeos/dbus_thread_manager_chrome.cc
@@ -0,0 +1,42 @@
+// Copyright 2016 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 "chrome/browser/chromeos/dbus_thread_manager_chrome.h"
+
+#include <utility>
+
+#include "chromeos/dbus/dbus_thread_manager.h"
+
+namespace {
+
+DBusThreadManagerChrome* g_instance = nullptr;
+
+} // namespace
+
+// static
+DBusThreadManagerChrome* DBusThreadManagerChrome::Get() {
+ CHECK(g_instance);
+ return g_instance;
+}
+
+DBusThreadManagerChrome::DBusThreadManagerChrome() {
+ DCHECK(!g_instance);
+ g_instance = this;
+ DCHECK(chromeos::DBusThreadManager::Get());
+}
+
+DBusThreadManagerChrome::~DBusThreadManagerChrome() {
+ DCHECK_EQ(this, g_instance);
+ g_instance = nullptr;
+}
+
+//JAMES for now, just forward. In theory, chrome should own this one. But it's
+// used in content/browser/tracing and extensions/browser/api/diagnostics
+chromeos::DebugDaemonClient* DBusThreadManagerChrome::GetDebugDaemonClient() {
+ return chromeos::DBusThreadManager::Get()->GetDebugDaemonClient();
+}
+
+chromeos::SystemClockClient* DBusThreadManagerChrome::GetSystemClockClient() {
+ return chromeos::DBusThreadManager::Get()->GetSystemClockClient();
+}
« no previous file with comments | « chrome/browser/chromeos/dbus_thread_manager_chrome.h ('k') | chrome/browser/chromeos/system_logs/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698