summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-02 23:38:09 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-02 23:38:09 +0000
commite52df78a3a91d83ba947e0a65aa5f3252657adf6 (patch)
tree96d37b8dc68118b744cf0f07af651f85a6077ace /dbus
parent11fbca0b619e6514dda96df6408b56c941000d98 (diff)
downloadchromium_src-e52df78a3a91d83ba947e0a65aa5f3252657adf6.zip
chromium_src-e52df78a3a91d83ba947e0a65aa5f3252657adf6.tar.gz
chromium_src-e52df78a3a91d83ba947e0a65aa5f3252657adf6.tar.bz2
Update dbus/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/15939006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus')
-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() {