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

Unified Diff: components/proximity_auth/fake_connection.cc

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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 | « components/proximity_auth/fake_connection.h ('k') | components/proximity_auth/messenger_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/fake_connection.cc
diff --git a/components/proximity_auth/fake_connection.cc b/components/proximity_auth/fake_connection.cc
index d7219665ac6ed2f8ef16dddb386d9c68e33be560..c8bca1df0f51a67054ba1e9913cffefb5d2c61d1 100644
--- a/components/proximity_auth/fake_connection.cc
+++ b/components/proximity_auth/fake_connection.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "components/proximity_auth/wire_message.h"
namespace proximity_auth {
@@ -31,7 +32,7 @@ void FakeConnection::FinishSendingMessageWithSuccess(bool success) {
CHECK(current_message_);
// Capture a copy of the message, as OnDidSendMessage() might reentrantly
// call SendMessage().
- scoped_ptr<WireMessage> sent_message = std::move(current_message_);
+ std::unique_ptr<WireMessage> sent_message = std::move(current_message_);
OnDidSendMessage(*sent_message, success);
}
@@ -41,15 +42,15 @@ void FakeConnection::ReceiveMessageWithPayload(const std::string& payload) {
pending_payload_.clear();
}
-void FakeConnection::SendMessageImpl(scoped_ptr<WireMessage> message) {
+void FakeConnection::SendMessageImpl(std::unique_ptr<WireMessage> message) {
CHECK(!current_message_);
current_message_ = std::move(message);
}
-scoped_ptr<WireMessage> FakeConnection::DeserializeWireMessage(
+std::unique_ptr<WireMessage> FakeConnection::DeserializeWireMessage(
bool* is_incomplete_message) {
*is_incomplete_message = false;
- return make_scoped_ptr(new WireMessage(pending_payload_));
+ return base::WrapUnique(new WireMessage(pending_payload_));
}
} // namespace proximity_auth
« no previous file with comments | « components/proximity_auth/fake_connection.h ('k') | components/proximity_auth/messenger_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698