| Index: dbus/object_manager.cc
|
| diff --git a/dbus/object_manager.cc b/dbus/object_manager.cc
|
| index 851fee44b2e140b41c39b6bc8b190319252c6b08..46d70b7b23096d47e1f11287639ae1da75657b88 100644
|
| --- a/dbus/object_manager.cc
|
| +++ b/dbus/object_manager.cc
|
| @@ -289,17 +289,16 @@ DBusHandlerResult ObjectManager::HandleMessage(DBusConnection* connection,
|
| if (bus_->HasDBusThread()) {
|
| // Post a task to run the method in the origin thread. Transfer ownership of
|
| // |signal| to NotifyPropertiesChanged, which will handle the clean up.
|
| - Signal* released_signal = signal.release();
|
| bus_->GetOriginTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&ObjectManager::NotifyPropertiesChanged,
|
| this, path,
|
| - released_signal));
|
| + base::Passed(&signal)));
|
| } else {
|
| // If the D-Bus thread is not used, just call the callback on the
|
| // current thread. Transfer the ownership of |signal| to
|
| // NotifyPropertiesChanged.
|
| - NotifyPropertiesChanged(path, signal.release());
|
| + NotifyPropertiesChanged(path, signal.Pass());
|
| }
|
|
|
| // We don't return DBUS_HANDLER_RESULT_HANDLED for signals because other
|
| @@ -309,16 +308,16 @@ DBusHandlerResult ObjectManager::HandleMessage(DBusConnection* connection,
|
|
|
| void ObjectManager::NotifyPropertiesChanged(
|
| const dbus::ObjectPath object_path,
|
| - Signal* signal) {
|
| + scoped_ptr<Signal> signal) {
|
| DCHECK(bus_);
|
| bus_->AssertOnOriginThread();
|
|
|
| - NotifyPropertiesChangedHelper(object_path, signal);
|
| + NotifyPropertiesChangedHelper(object_path, signal.get());
|
|
|
| // Delete the message on the D-Bus thread. See comments in HandleMessage.
|
| bus_->GetDBusTaskRunner()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&base::DeletePointer<Signal>, signal));
|
| + base::Bind(&base::DeletePointer<Signal>, base::Passed(&signal)));
|
| }
|
|
|
| void ObjectManager::NotifyPropertiesChangedHelper(
|
|
|