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

Unified Diff: components/proximity_auth/device_to_device_secure_context_unittest.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
Index: components/proximity_auth/device_to_device_secure_context_unittest.cc
diff --git a/components/proximity_auth/device_to_device_secure_context_unittest.cc b/components/proximity_auth/device_to_device_secure_context_unittest.cc
index 0a735965e68ed73da8a186f15b88528cc5656cc7..63d449d8b90abc7d4e4e980e3606d7edcbb0d00b 100644
--- a/components/proximity_auth/device_to_device_secure_context_unittest.cc
+++ b/components/proximity_auth/device_to_device_secure_context_unittest.cc
@@ -4,8 +4,10 @@
#include "components/proximity_auth/device_to_device_secure_context.h"
+#include <memory>
+
#include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h"
#include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h"
#include "components/proximity_auth/cryptauth/proto/securemessage.pb.h"
@@ -30,7 +32,7 @@ void SaveResult(std::string* result_out, const std::string& result) {
class ProximityAuthDeviceToDeviceSecureContextTest : public testing::Test {
protected:
ProximityAuthDeviceToDeviceSecureContextTest()
- : secure_context_(make_scoped_ptr(new FakeSecureMessageDelegate()),
+ : secure_context_(base::WrapUnique(new FakeSecureMessageDelegate()),
kSymmetricKey,
kResponderAuthMessage,
kProtocolVersion) {}
@@ -72,7 +74,7 @@ TEST_F(ProximityAuthDeviceToDeviceSecureContextTest, DecodeInvalidMessage) {
TEST_F(ProximityAuthDeviceToDeviceSecureContextTest, EncodeAndDecode) {
// Initialize second secure channel with the same parameters as the first.
DeviceToDeviceSecureContext secure_context2(
- make_scoped_ptr(new FakeSecureMessageDelegate()), kSymmetricKey,
+ base::WrapUnique(new FakeSecureMessageDelegate()), kSymmetricKey,
kResponderAuthMessage, kProtocolVersion);
std::string message = "encrypt this message";
@@ -93,7 +95,7 @@ TEST_F(ProximityAuthDeviceToDeviceSecureContextTest,
DecodeInvalidSequenceNumber) {
// Initialize second secure channel with the same parameters as the first.
DeviceToDeviceSecureContext secure_context2(
- make_scoped_ptr(new FakeSecureMessageDelegate()), kSymmetricKey,
+ base::WrapUnique(new FakeSecureMessageDelegate()), kSymmetricKey,
kResponderAuthMessage, kProtocolVersion);
// Send a few messages over the first secure context.
« no previous file with comments | « components/proximity_auth/device_to_device_secure_context.cc ('k') | components/proximity_auth/fake_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698