Index: dbus/end_to_end_sync_unittest.cc |
diff --git a/dbus/end_to_end_sync_unittest.cc b/dbus/end_to_end_sync_unittest.cc |
index 47dc9b1207fefc7fc3fb597ad949ea42a4376726..4eb9cd1950c8f88a6bac3a096a2c973433aef2f2 100644 |
--- a/dbus/end_to_end_sync_unittest.cc |
+++ b/dbus/end_to_end_sync_unittest.cc |
@@ -2,8 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <memory> |
+ |
#include "base/memory/ref_counted.h" |
-#include "base/memory/scoped_ptr.h" |
#include "dbus/bus.h" |
#include "dbus/message.h" |
#include "dbus/object_path.h" |
@@ -47,7 +48,7 @@ class EndToEndSyncTest : public testing::Test { |
} |
protected: |
- scoped_ptr<TestService> test_service_; |
+ std::unique_ptr<TestService> test_service_; |
scoped_refptr<Bus> client_bus_; |
ObjectProxy* object_proxy_; |
}; |
@@ -62,7 +63,7 @@ TEST_F(EndToEndSyncTest, Echo) { |
// Call the method. |
const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
ASSERT_TRUE(response.get()); |
@@ -83,7 +84,7 @@ TEST_F(EndToEndSyncTest, Timeout) { |
// Call the method with timeout of 0ms. |
const int timeout_ms = 0; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
// Should fail because of timeout. |
ASSERT_FALSE(response.get()); |
@@ -93,7 +94,7 @@ TEST_F(EndToEndSyncTest, NonexistentMethod) { |
MethodCall method_call("org.chromium.TestInterface", "Nonexistent"); |
const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
ASSERT_FALSE(response.get()); |
} |
@@ -102,7 +103,7 @@ TEST_F(EndToEndSyncTest, BrokenMethod) { |
MethodCall method_call("org.chromium.TestInterface", "BrokenMethod"); |
const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
ASSERT_FALSE(response.get()); |
} |
@@ -118,7 +119,7 @@ TEST_F(EndToEndSyncTest, InvalidObjectPath) { |
MethodCall method_call("org.chromium.TestInterface", "Echo"); |
const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
ASSERT_FALSE(response.get()); |
} |
@@ -134,7 +135,7 @@ TEST_F(EndToEndSyncTest, InvalidServiceName) { |
MethodCall method_call("org.chromium.TestInterface", "Echo"); |
const int timeout_ms = ObjectProxy::TIMEOUT_USE_DEFAULT; |
- scoped_ptr<Response> response( |
+ std::unique_ptr<Response> response( |
object_proxy_->CallMethodAndBlock(&method_call, timeout_ms)); |
ASSERT_FALSE(response.get()); |
} |