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

Unified Diff: dbus/mock_object_proxy.h

Issue 1867253002: Convert //dbus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes in //device Created 4 years, 8 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/message_unittest.cc ('k') | dbus/mock_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/mock_object_proxy.h
diff --git a/dbus/mock_object_proxy.h b/dbus/mock_object_proxy.h
index 66f485ad06ff31c6fa632edde692a5de6808fb41..f27f6f6acced3e48998adc3130d54f8e5031a6ef 100644
--- a/dbus/mock_object_proxy.h
+++ b/dbus/mock_object_proxy.h
@@ -21,27 +21,28 @@ class MockObjectProxy : public ObjectProxy {
const std::string& service_name,
const ObjectPath& object_path);
- // GMock doesn't support the return type of scoped_ptr<> because scoped_ptr is
- // uncopyable. This is a workaround which defines |MockCallMethodAndBlock| as
- // a mock method and makes |CallMethodAndBlock| call the mocked method.
- // Use |MockCallMethodAndBlock| for setting/testing expectations.
+ // GMock doesn't support the return type of std::unique_ptr<> because
+ // std::unique_ptr is uncopyable. This is a workaround which defines
+ // |MockCallMethodAndBlock| as a mock method and makes
+ // |CallMethodAndBlock| call the mocked method. Use |MockCallMethodAndBlock|
+ // for setting/testing expectations.
MOCK_METHOD3(MockCallMethodAndBlockWithErrorDetails,
Response*(MethodCall* method_call,
int timeout_ms,
ScopedDBusError* error));
- scoped_ptr<Response> CallMethodAndBlockWithErrorDetails(
+ std::unique_ptr<Response> CallMethodAndBlockWithErrorDetails(
MethodCall* method_call,
int timeout_ms,
ScopedDBusError* error) override {
- return scoped_ptr<Response>(
+ return std::unique_ptr<Response>(
MockCallMethodAndBlockWithErrorDetails(method_call, timeout_ms, error));
}
MOCK_METHOD2(MockCallMethodAndBlock, Response*(MethodCall* method_call,
int timeout_ms));
- scoped_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
- int timeout_ms) override {
- return scoped_ptr<Response>(MockCallMethodAndBlock(method_call,
- timeout_ms));
+ std::unique_ptr<Response> CallMethodAndBlock(MethodCall* method_call,
+ int timeout_ms) override {
+ return std::unique_ptr<Response>(
+ MockCallMethodAndBlock(method_call, timeout_ms));
}
MOCK_METHOD3(CallMethod, void(MethodCall* method_call,
int timeout_ms,
« no previous file with comments | « dbus/message_unittest.cc ('k') | dbus/mock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698