Convert //dbus from scoped_ptr to std::unique_ptr
BUG=554298
R=hashimoto@chromium.org
TBR=scheib@chromium.org
Review URL: https://codereview.chromium.org/1867253002
Cr-Commit-Position: refs/heads/master@{#386236}
CrOS-Libchrome-Original-Commit: 2a193281aac690b3fdfba1246d6b36877553a9be
diff --git a/dbus/mock_unittest.cc b/dbus/mock_unittest.cc
index 6b2a521..ed78e2c 100644
--- a/dbus/mock_unittest.cc
+++ b/dbus/mock_unittest.cc
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
+
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "dbus/message.h"
@@ -82,7 +83,7 @@
protected:
std::string response_string_;
base::MessageLoop message_loop_;
- scoped_ptr<base::RunLoop> run_loop_;
+ std::unique_ptr<base::RunLoop> run_loop_;
scoped_refptr<MockBus> mock_bus_;
scoped_refptr<MockObjectProxy> mock_proxy_;
@@ -96,7 +97,7 @@
MessageReader reader(method_call);
std::string text_message;
if (reader.PopString(&text_message)) {
- scoped_ptr<Response> response = Response::CreateEmpty();
+ std::unique_ptr<Response> response = Response::CreateEmpty();
MessageWriter writer(response.get());
writer.AppendString(text_message);
return response.release();
@@ -151,9 +152,8 @@
writer.AppendString(kHello);
// Call the method.
- scoped_ptr<Response> response(
- proxy->CallMethodAndBlock(&method_call,
- ObjectProxy::TIMEOUT_USE_DEFAULT));
+ std::unique_ptr<Response> response(proxy->CallMethodAndBlock(
+ &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT));
// Check the response.
ASSERT_TRUE(response.get());
@@ -175,9 +175,8 @@
ScopedDBusError error;
// Call the method.
- scoped_ptr<Response> response(
- proxy->CallMethodAndBlockWithErrorDetails(
- &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT, &error));
+ std::unique_ptr<Response> response(proxy->CallMethodAndBlockWithErrorDetails(
+ &method_call, ObjectProxy::TIMEOUT_USE_DEFAULT, &error));
// Check the response.
ASSERT_FALSE(response.get());