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

Side by Side Diff: components/proximity_auth/device_to_device_authenticator_unittest.cc

Issue 2250023005: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/proximity_auth/device_to_device_authenticator.h" 5 #include "components/proximity_auth/device_to_device_authenticator.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64url.h" 9 #include "base/base64url.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 SendMessagesAfterAuthenticationSuccess) { 334 SendMessagesAfterAuthenticationSuccess) {
335 std::string hello_message = BeginAuthentication(); 335 std::string hello_message = BeginAuthentication();
336 EXPECT_CALL(*this, 336 EXPECT_CALL(*this,
337 OnAuthenticationResultProxy(Authenticator::Result::SUCCESS)); 337 OnAuthenticationResultProxy(Authenticator::Result::SUCCESS));
338 SimulateResponderAuth(hello_message); 338 SimulateResponderAuth(hello_message);
339 339
340 // Test that the authenticator is properly cleaned up after authentication 340 // Test that the authenticator is properly cleaned up after authentication
341 // completes. 341 // completes.
342 WireMessage wire_message(base::RandBytesAsString(300u)); 342 WireMessage wire_message(base::RandBytesAsString(300u));
343 connection_.SendMessage( 343 connection_.SendMessage(
344 base::WrapUnique(new WireMessage(base::RandBytesAsString(300u)))); 344 base::MakeUnique<WireMessage>(base::RandBytesAsString(300u)));
345 connection_.OnBytesReceived(wire_message.Serialize()); 345 connection_.OnBytesReceived(wire_message.Serialize());
346 connection_.SendMessage( 346 connection_.SendMessage(
347 base::WrapUnique(new WireMessage(base::RandBytesAsString(300u)))); 347 base::MakeUnique<WireMessage>(base::RandBytesAsString(300u)));
348 connection_.OnBytesReceived(wire_message.Serialize()); 348 connection_.OnBytesReceived(wire_message.Serialize());
349 } 349 }
350 350
351 } // namespace proximity_auth 351 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698