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

Unified Diff: dbus/mock_unittest.cc

Issue 12092061: Code cleaning: Uses scoped_ptr<> to express ownership rather than writing ownership in comments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added chrome/browser/password_manager/native_backend_kwallet_x_unitte\ Created 7 years, 11 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 | « dbus/mock_object_proxy.h ('k') | dbus/object_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/mock_unittest.cc
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc
index cf644df0d861bc67dea4dba9cce47f82f0725cf2..f86008298a33632c1df8670fe4ef6af0b724184f 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();
}
}
« no previous file with comments | « dbus/mock_object_proxy.h ('k') | dbus/object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698