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

Unified Diff: chromeos/dbus/blocking_method_caller_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 | « chromeos/dbus/blocking_method_caller.cc ('k') | chromeos/dbus/bluetooth_agent_service_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/blocking_method_caller_unittest.cc
diff --git a/chromeos/dbus/blocking_method_caller_unittest.cc b/chromeos/dbus/blocking_method_caller_unittest.cc
index eb2394ac8bbaa42716ed3c54138d268da16a3c10..2abfd642525555974c457327b35ba735933c5113 100644
--- a/chromeos/dbus/blocking_method_caller_unittest.cc
+++ b/chromeos/dbus/blocking_method_caller_unittest.cc
@@ -39,7 +39,7 @@ class BlockingMethodCallerTest : 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, &BlockingMethodCallerTest::CreateMockProxyResponse));
@@ -78,10 +78,10 @@ class BlockingMethodCallerTest : 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 | « chromeos/dbus/blocking_method_caller.cc ('k') | chromeos/dbus/bluetooth_agent_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698