summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dbus/bus.cc6
-rw-r--r--dbus/mock_unittest.cc16
2 files changed, 10 insertions, 12 deletions
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 0c8772b..3dbbedc 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -225,7 +225,7 @@ ObjectProxy* Bus::GetObjectProxyWithOptions(const std::string& service_name,
options);
ObjectProxyTable::iterator iter = object_proxy_table_.find(key);
if (iter != object_proxy_table_.end()) {
- return iter->second;
+ return iter->second.get();
}
scoped_refptr<ObjectProxy> object_proxy =
@@ -281,7 +281,7 @@ ExportedObject* Bus::GetExportedObject(const ObjectPath& object_path) {
// Check if we already have the requested exported object.
ExportedObjectTable::iterator iter = exported_object_table_.find(object_path);
if (iter != exported_object_table_.end()) {
- return iter->second;
+ return iter->second.get();
}
scoped_refptr<ExportedObject> exported_object =
@@ -328,7 +328,7 @@ ObjectManager* Bus::GetObjectManager(const std::string& service_name,
const ObjectManagerTable::key_type key(service_name + object_path.value());
ObjectManagerTable::iterator iter = object_manager_table_.find(key);
if (iter != object_manager_table_.end()) {
- return iter->second;
+ return iter->second.get();
}
scoped_refptr<ObjectManager> object_manager =
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc
index c12a383..a329fe8 100644
--- a/dbus/mock_unittest.cc
+++ b/dbus/mock_unittest.cc
@@ -39,25 +39,23 @@ class MockTest : public testing::Test {
// Set an expectation so mock_proxy's CallMethodAndBlock() will use
// CreateMockProxyResponse() to return responses.
- EXPECT_CALL(*mock_proxy_, MockCallMethodAndBlock(_, _))
+ EXPECT_CALL(*mock_proxy_.get(), MockCallMethodAndBlock(_, _))
.WillRepeatedly(Invoke(this, &MockTest::CreateMockProxyResponse));
// Set an expectation so mock_proxy's CallMethod() will use
// HandleMockProxyResponseWithMessageLoop() to return responses.
- EXPECT_CALL(*mock_proxy_, CallMethod(_, _, _))
- .WillRepeatedly(
- Invoke(this,
- &MockTest::HandleMockProxyResponseWithMessageLoop));
+ EXPECT_CALL(*mock_proxy_.get(), CallMethod(_, _, _)).WillRepeatedly(
+ Invoke(this, &MockTest::HandleMockProxyResponseWithMessageLoop));
// Set an expectation so mock_bus's GetObjectProxy() for the given
// service name and the object path will return mock_proxy_.
- EXPECT_CALL(*mock_bus_, GetObjectProxy(
- "org.chromium.TestService",
- dbus::ObjectPath("/org/chromium/TestObject")))
+ EXPECT_CALL(*mock_bus_.get(),
+ GetObjectProxy("org.chromium.TestService",
+ dbus::ObjectPath("/org/chromium/TestObject")))
.WillOnce(Return(mock_proxy_.get()));
// ShutdownAndBlock() will be called in TearDown().
- EXPECT_CALL(*mock_bus_, ShutdownAndBlock()).WillOnce(Return());
+ EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return());
}
virtual void TearDown() {