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

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

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 | « chrome/browser/chromeos/dbus/dbus_thread_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/dbus_thread_manager.cc
diff --git a/chrome/browser/chromeos/dbus/dbus_thread_manager.cc b/chrome/browser/chromeos/dbus/dbus_thread_manager.cc
index e2e0ec60d5d118a1750356b46a2e7e041bdecada..c3e1009bd57da6863c7d2c1fcca4a9423168a97e 100644
--- a/chrome/browser/chromeos/dbus/dbus_thread_manager.cc
+++ b/chrome/browser/chromeos/dbus/dbus_thread_manager.cc
@@ -36,7 +36,7 @@ DBusThreadManager::DBusThreadManager() {
system_bus_ = new dbus::Bus(system_bus_options);
// Create and start the cros D-Bus service.
- cros_dbus_service_ = CrosDBusService::Create(system_bus_.get());
+ cros_dbus_service_.reset(CrosDBusService::Create(system_bus_.get()));
cros_dbus_service_->Start();
// Start monitoring sensors if needed.
@@ -71,10 +71,6 @@ DBusThreadManager::~DBusThreadManager() {
// Stop the D-Bus thread.
dbus_thread_->Stop();
-
- // D-Bus clients should be deleted after the D-Bus thread is stopped.
- // See "CALLBACKS IN D-BUS CLIENTS" in the header file for why.
- delete cros_dbus_service_;
}
void DBusThreadManager::Initialize() {
« no previous file with comments | « chrome/browser/chromeos/dbus/dbus_thread_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698