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

Unified Diff: components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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 side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc
index 7c1bde6e5a0e5cf4fd21353af144b8efb39d0ac8..e70f5a9d5fca8ca26de1f173c79a4e69a8baf5c6 100644
--- a/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc
@@ -5,6 +5,7 @@
#include "components/proximity_auth/cryptauth/cryptauth_device_manager.h"
#include <stddef.h>
+#include <utility>
#include "base/base64url.h"
#include "base/macros.h"
@@ -116,8 +117,8 @@ class TestCryptAuthDeviceManager : public CryptAuthDeviceManager {
scoped_ptr<CryptAuthClientFactory> client_factory,
CryptAuthGCMManager* gcm_manager,
PrefService* pref_service)
- : CryptAuthDeviceManager(clock.Pass(),
- client_factory.Pass(),
+ : CryptAuthDeviceManager(std::move(clock),
+ std::move(client_factory),
gcm_manager,
pref_service),
scoped_sync_scheduler_(new NiceMock<MockSyncScheduler>()),
@@ -127,7 +128,7 @@ class TestCryptAuthDeviceManager : public CryptAuthDeviceManager {
scoped_ptr<SyncScheduler> CreateSyncScheduler() override {
EXPECT_TRUE(scoped_sync_scheduler_);
- return scoped_sync_scheduler_.Pass();
+ return std::move(scoped_sync_scheduler_);
}
base::WeakPtr<MockSyncScheduler> GetSyncScheduler() {
@@ -202,7 +203,7 @@ class ProximityAuthCryptAuthDeviceManagerTest
{
ListPrefUpdate update(&pref_service_,
prefs::kCryptAuthDeviceSyncUnlockKeys);
- update.Get()->Append(unlock_key_dictionary.Pass());
+ update.Get()->Append(std::move(unlock_key_dictionary));
}
device_manager_.reset(new TestCryptAuthDeviceManager(
@@ -255,7 +256,7 @@ class ProximityAuthCryptAuthDeviceManagerTest
scoped_ptr<SyncScheduler::SyncRequest> sync_request = make_scoped_ptr(
new SyncScheduler::SyncRequest(device_manager_->GetSyncScheduler()));
EXPECT_CALL(*this, OnSyncStartedProxy());
- delegate->OnSyncRequested(sync_request.Pass());
+ delegate->OnSyncRequested(std::move(sync_request));
EXPECT_EQ(expected_invocation_reason,
get_my_devices_request_.invocation_reason());
@@ -348,7 +349,7 @@ TEST_F(ProximityAuthCryptAuthDeviceManagerTest, InitWithDefaultPrefs) {
CryptAuthDeviceManager::RegisterPrefs(pref_service.registry());
TestCryptAuthDeviceManager device_manager(
- clock.Pass(),
+ std::move(clock),
make_scoped_ptr(new MockCryptAuthClientFactory(
MockCryptAuthClientFactory::MockType::MAKE_STRICT_MOCKS)),
&gcm_manager_, &pref_service);

Powered by Google App Engine
This is Rietveld 408576698