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

Unified Diff: chrome/browser/chromeos/dbus/dbus_thread_manager.h

Issue 8341073: chromeos: Use scoped_ptr for CrosDBusService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « no previous file | chrome/browser/chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/dbus_thread_manager.h
diff --git a/chrome/browser/chromeos/dbus/dbus_thread_manager.h b/chrome/browser/chromeos/dbus/dbus_thread_manager.h
index f9ead09421af297ea57e504419ec3918d7e881bf..04fa9b81dcc43f76e37d5258bf3df6f85cfac7a0 100644
--- a/chrome/browser/chromeos/dbus/dbus_thread_manager.h
+++ b/chrome/browser/chromeos/dbus/dbus_thread_manager.h
@@ -39,11 +39,11 @@ class SpeechSynthesizerClient;
// D-Bus clients managed by DBusThreadManager are guaranteed to be deleted
// after the D-Bus thread so the clients don't need to worry if new
// incoming messages arrive from the D-Bus thread during shutdown of the
-// clients. However, the UI message loop may still be running during the
-// shutdown, hence the D-Bus clients should inherit
-// base::RefCountedThreadSafe if they export methods or call methods, to
-// ensure that callbacks can reference |this| safely on the UI thread
-// during the shutdown.
+// clients. The UI message loop is not running during the shutdown hence
+// the UI message loop won't post tasks to D-BUS clients during the
+// shutdown. However, to be extra cautious, clients should use
+// WeakPtrFactory when creating callbacks that run on UI thread. See
+// session_manager_client.cc for examples.
//
class DBusThreadManager {
public:
@@ -103,7 +103,7 @@ class DBusThreadManager {
scoped_ptr<base::Thread> dbus_thread_;
scoped_refptr<dbus::Bus> system_bus_;
- CrosDBusService* cros_dbus_service_;
+ scoped_ptr<CrosDBusService> cros_dbus_service_;
scoped_ptr<SensorsSource> sensors_source_;
scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_;
scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698