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

Side by Side Diff: remoting/protocol/pairing_registry_unittest.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/pairing_registry.h" 5 #include "remoting/protocol/pairing_registry.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } // namespace 58 } // namespace
59 59
60 namespace remoting { 60 namespace remoting {
61 namespace protocol { 61 namespace protocol {
62 62
63 class PairingRegistryTest : public testing::Test { 63 class PairingRegistryTest : public testing::Test {
64 public: 64 public:
65 void SetUp() override { callback_count_ = 0; } 65 void SetUp() override { callback_count_ = 0; }
66 66
67 void set_pairings(scoped_ptr<base::ListValue> pairings) { 67 void set_pairings(scoped_ptr<base::ListValue> pairings) {
68 pairings_ = pairings.Pass(); 68 pairings_ = std::move(pairings);
69 } 69 }
70 70
71 void ExpectSecret(const std::string& expected, 71 void ExpectSecret(const std::string& expected,
72 PairingRegistry::Pairing actual) { 72 PairingRegistry::Pairing actual) {
73 EXPECT_EQ(expected, actual.shared_secret()); 73 EXPECT_EQ(expected, actual.shared_secret());
74 ++callback_count_; 74 ++callback_count_;
75 } 75 }
76 76
77 void ExpectSaveSuccess(bool success) { 77 void ExpectSaveSuccess(bool success) {
78 EXPECT_TRUE(success); 78 EXPECT_TRUE(success);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 registry->GetPairing( 248 registry->GetPairing(
249 pairing_3.client_id(), 249 pairing_3.client_id(),
250 base::Bind(&MockPairingRegistryCallbacks::GetPairingCallback, 250 base::Bind(&MockPairingRegistryCallbacks::GetPairingCallback,
251 base::Unretained(&callbacks))); 251 base::Unretained(&callbacks)));
252 252
253 run_loop_.Run(); 253 run_loop_.Run();
254 } 254 }
255 255
256 } // namespace protocol 256 } // namespace protocol
257 } // namespace remoting 257 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698