summaryrefslogtreecommitdiffstats
path: root/dbus/mock_unittest.cc
diff options
context:
space:
mode:
authoryuki@chromium.org <yuki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 09:46:24 +0000
committeryuki@chromium.org <yuki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 09:46:24 +0000
commit9b25d4557040da82c582d7dca22bc7a334a97f48 (patch)
tree4abc6ffa62f5cb58262d182843aade883eaed1e5 /dbus/mock_unittest.cc
parentd43177fa5c889a451b6a033c970a7e25bcb6ad37 (diff)
downloadchromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.zip
chromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.tar.gz
chromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.tar.bz2
Code cleaning: Uses scoped_ptr<> to express ownership rather than writing ownership in comments.
Replaces Response* with scoped_ptr<Response> in dbus code and its related code. BUG=163231 TEST=no regression / no behavior changes Review URL: https://chromiumcodereview.appspot.com/12092061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/mock_unittest.cc')
-rw-r--r--dbus/mock_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc
index cf644df..f860082 100644
--- a/dbus/mock_unittest.cc
+++ b/dbus/mock_unittest.cc
@@ -39,7 +39,7 @@ class MockTest : public testing::Test {
// Set an expectation so mock_proxy's CallMethodAndBlock() will use
// CreateMockProxyResponse() to return responses.
- EXPECT_CALL(*mock_proxy_, CallMethodAndBlock(_, _))
+ EXPECT_CALL(*mock_proxy_, MockCallMethodAndBlock(_, _))
.WillRepeatedly(Invoke(this, &MockTest::CreateMockProxyResponse));
// Set an expectation so mock_proxy's CallMethod() will use
@@ -91,10 +91,10 @@ class MockTest : public testing::Test {
dbus::MessageReader reader(method_call);
std::string text_message;
if (reader.PopString(&text_message)) {
- dbus::Response* response = dbus::Response::CreateEmpty();
- dbus::MessageWriter writer(response);
+ scoped_ptr<dbus::Response> response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
writer.AppendString(text_message);
- return response;
+ return response.release();
}
}