summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-12-30 20:54:47 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-31 04:56:00 +0000
commitdc5f124021b338adc8caa533583eab97813558fe (patch)
treee7142722319d1beb1a969eb019572a5631764248
parent902fcc5c3732cf387828f7e0c10a810e5bf85714 (diff)
downloadchromium_src-dc5f124021b338adc8caa533583eab97813558fe.zip
chromium_src-dc5f124021b338adc8caa533583eab97813558fe.tar.gz
chromium_src-dc5f124021b338adc8caa533583eab97813558fe.tar.bz2
Convert Pass()→std::move() in //components (CrOS edition)
(╯^□^)╯︵ ❄☃❄ BUG=557422 R=avi@chromium.org TBR=caitkp@chromium.org Review URL: https://codereview.chromium.org/1552023002 Cr-Commit-Position: refs/heads/master@{#367228}
-rw-r--r--components/drive/change_list_loader_unittest.cc2
-rw-r--r--components/drive/change_list_processor_unittest.cc56
-rw-r--r--components/drive/directory_loader_unittest.cc2
-rw-r--r--components/drive/file_system_unittest.cc4
-rw-r--r--components/gcm_driver/gcm_driver_desktop.cc2
-rw-r--r--components/ownership/owner_key_util.cc6
-rw-r--r--components/ownership/owner_key_util_impl.cc2
-rw-r--r--components/ownership/owner_settings_service.cc4
-rw-r--r--components/pairing/bluetooth_controller_pairing_controller.cc4
-rw-r--r--components/pairing/shark_connection_listener.cc4
-rw-r--r--components/policy/core/common/proxy_policy_provider.cc6
-rw-r--r--components/policy/core/common/proxy_policy_provider_unittest.cc2
-rw-r--r--components/rlz/rlz_tracker.cc5
-rw-r--r--components/storage_monitor/storage_monitor_chromeos_unittest.cc3
-rw-r--r--components/timers/alarm_timer_chromeos.cc3
-rw-r--r--components/user_manager/user_manager_base.cc4
-rw-r--r--components/wifi_sync/wifi_credential_syncable_service.cc5
-rw-r--r--components/wifi_sync/wifi_credential_syncable_service_unittest.cc5
18 files changed, 66 insertions, 53 deletions
diff --git a/components/drive/change_list_loader_unittest.cc b/components/drive/change_list_loader_unittest.cc
index 4a34775..cef19aef 100644
--- a/components/drive/change_list_loader_unittest.cc
+++ b/components/drive/change_list_loader_unittest.cc
@@ -127,7 +127,7 @@ class ChangeListLoaderTest : public testing::Test {
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(google_apis::HTTP_CREATED, error);
- return entry.Pass();
+ return entry;
}
content::TestBrowserThreadBundle thread_bundle_;
diff --git a/components/drive/change_list_processor_unittest.cc b/components/drive/change_list_processor_unittest.cc
index 9a8473f..1d1f73e 100644
--- a/components/drive/change_list_processor_unittest.cc
+++ b/components/drive/change_list_processor_unittest.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
@@ -98,7 +99,7 @@ ScopedVector<ChangeList> CreateBaseChangeList() {
change_lists[0]->mutable_parent_resource_ids()->push_back("");
change_lists[0]->set_largest_changestamp(kBaseResourceListChangestamp);
- return change_lists.Pass();
+ return change_lists;
}
class ChangeListProcessorTest : public testing::Test {
@@ -132,8 +133,7 @@ class ChangeListProcessorTest : public testing::Test {
about_resource->set_root_folder_id(kRootId);
ChangeListProcessor processor(metadata_.get(), nullptr);
- return processor.Apply(about_resource.Pass(),
- changes.Pass(),
+ return processor.Apply(std::move(about_resource), std::move(changes),
false /* is_delta_update */);
}
@@ -147,9 +147,9 @@ class ChangeListProcessorTest : public testing::Test {
about_resource->set_root_folder_id(kRootId);
ChangeListProcessor processor(metadata_.get(), nullptr);
- FileError error = processor.Apply(about_resource.Pass(),
- changes.Pass(),
- true /* is_delta_update */);
+ FileError error =
+ processor.Apply(std::move(about_resource), std::move(changes),
+ true /* is_delta_update */);
*changed_files = processor.changed_files();
return error;
}
@@ -162,7 +162,7 @@ class ChangeListProcessorTest : public testing::Test {
base::FilePath::FromUTF8Unsafe(path), entry.get());
if (error != FILE_ERROR_OK)
entry.reset();
- return entry.Pass();
+ return entry;
}
content::TestBrowserThreadBundle thread_bundle_;
@@ -246,7 +246,7 @@ TEST_F(ChangeListProcessorTest, DeltaFileAddedInNewDirectory) {
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
@@ -281,7 +281,7 @@ TEST_F(ChangeListProcessorTest, DeltaDirMovedFromRootToDirectory) {
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
@@ -317,7 +317,7 @@ TEST_F(ChangeListProcessorTest, DeltaFileMovedFromDirectoryToRoot) {
EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList()));
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
@@ -350,7 +350,7 @@ TEST_F(ChangeListProcessorTest, DeltaFileRenamedInDirectory) {
EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList()));
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
EXPECT_EQ(2U, changed_files.size());
EXPECT_TRUE(changed_files.count(base::FilePath::FromUTF8Unsafe(
"drive/root/Directory 1/SubDirectory File 1.txt")));
@@ -389,7 +389,7 @@ TEST_F(ChangeListProcessorTest, DeltaAddAndDeleteFileInRoot) {
EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList()));
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
@@ -410,7 +410,7 @@ TEST_F(ChangeListProcessorTest, DeltaAddAndDeleteFileInRoot) {
// Apply.
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
EXPECT_EQ(16687, changestamp);
EXPECT_FALSE(GetResourceEntry("drive/root/Added file.txt"));
@@ -438,7 +438,7 @@ TEST_F(ChangeListProcessorTest, DeltaAddAndDeleteFileFromExistingDirectory) {
EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList()));
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
EXPECT_EQ(16730, changestamp);
@@ -460,7 +460,7 @@ TEST_F(ChangeListProcessorTest, DeltaAddAndDeleteFileFromExistingDirectory) {
// Apply.
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
EXPECT_EQ(16770, changestamp);
EXPECT_FALSE(GetResourceEntry("drive/root/Directory 1/Added file.txt"));
@@ -500,7 +500,7 @@ TEST_F(ChangeListProcessorTest, DeltaAddFileToNewButDeletedDirectory) {
EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList()));
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
int64_t changestamp = 0;
EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp));
@@ -538,11 +538,11 @@ TEST_F(ChangeListProcessorTest, RefreshDirectory) {
util::GetDriveMyDriveRootPath(), &root));
const int64_t kNewChangestamp = 12345;
ResourceEntryVector refreshed_entries;
- EXPECT_EQ(FILE_ERROR_OK, ChangeListProcessor::RefreshDirectory(
- metadata_.get(),
- DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp),
- change_list.Pass(),
- &refreshed_entries));
+ EXPECT_EQ(FILE_ERROR_OK,
+ ChangeListProcessor::RefreshDirectory(
+ metadata_.get(),
+ DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp),
+ std::move(change_list), &refreshed_entries));
// "new_file" should be added.
ResourceEntry entry;
@@ -575,11 +575,11 @@ TEST_F(ChangeListProcessorTest, RefreshDirectory_WrongParentId) {
util::GetDriveMyDriveRootPath(), &root));
const int64_t kNewChangestamp = 12345;
ResourceEntryVector refreshed_entries;
- EXPECT_EQ(FILE_ERROR_OK, ChangeListProcessor::RefreshDirectory(
- metadata_.get(),
- DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp),
- change_list.Pass(),
- &refreshed_entries));
+ EXPECT_EQ(FILE_ERROR_OK,
+ ChangeListProcessor::RefreshDirectory(
+ metadata_.get(),
+ DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp),
+ std::move(change_list), &refreshed_entries));
// "new_file" should not be added.
ResourceEntry entry;
@@ -605,7 +605,7 @@ TEST_F(ChangeListProcessorTest, SharedFilesWithNoParentInFeed) {
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
// "new_file" should be added under drive/other.
ResourceEntry entry;
@@ -650,7 +650,7 @@ TEST_F(ChangeListProcessorTest, ModificationDate) {
// Apply the change.
FileChange changed_files;
EXPECT_EQ(FILE_ERROR_OK,
- ApplyChangeList(change_lists.Pass(), &changed_files));
+ ApplyChangeList(std::move(change_lists), &changed_files));
// The change is rejected due to the old modification date.
ResourceEntry entry;
diff --git a/components/drive/directory_loader_unittest.cc b/components/drive/directory_loader_unittest.cc
index 7f559c0..810a3db 100644
--- a/components/drive/directory_loader_unittest.cc
+++ b/components/drive/directory_loader_unittest.cc
@@ -122,7 +122,7 @@ class DirectoryLoaderTest : public testing::Test {
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(google_apis::HTTP_CREATED, error);
- return entry.Pass();
+ return entry;
}
content::TestBrowserThreadBundle thread_bundle_;
diff --git a/components/drive/file_system_unittest.cc b/components/drive/file_system_unittest.cc
index b43cf82..354c3e4 100644
--- a/components/drive/file_system_unittest.cc
+++ b/components/drive/file_system_unittest.cc
@@ -178,7 +178,7 @@ class FileSystemTest : public testing::Test {
google_apis::test_util::CreateCopyResultCallback(&error, &entry));
content::RunAllBlockingPoolTasksUntilIdle();
- return entry.Pass();
+ return entry;
}
// Gets directory info by path synchronously.
@@ -193,7 +193,7 @@ class FileSystemTest : public testing::Test {
content::RunAllBlockingPoolTasksUntilIdle();
if (error != FILE_ERROR_OK)
entries.reset();
- return entries.Pass();
+ return entries;
}
// Used to implement ReadDirectorySync().
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index dbb6dba..b967fea 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -480,7 +480,7 @@ void GCMDriverDesktop::IOWorker::WakeFromSuspendForHeartbeat(bool wake) {
else
timer.reset(new base::Timer(true, false));
- gcm_client_->UpdateHeartbeatTimer(timer.Pass());
+ gcm_client_->UpdateHeartbeatTimer(std::move(timer));
#endif
}
diff --git a/components/ownership/owner_key_util.cc b/components/ownership/owner_key_util.cc
index a049729..55b5fd4 100644
--- a/components/ownership/owner_key_util.cc
+++ b/components/ownership/owner_key_util.cc
@@ -4,6 +4,8 @@
#include "components/ownership/owner_key_util.h"
+#include <utility>
+
namespace ownership {
///////////////////////////////////////////////////////////////////////////
@@ -18,8 +20,8 @@ PublicKey::~PublicKey() {
///////////////////////////////////////////////////////////////////////////
// PrivateKey
-PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key) : key_(key.Pass()) {
-}
+PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key)
+ : key_(std::move(key)) {}
PrivateKey::~PrivateKey() {
}
diff --git a/components/ownership/owner_key_util_impl.cc b/components/ownership/owner_key_util_impl.cc
index 0d36ede..04547ce 100644
--- a/components/ownership/owner_key_util_impl.cc
+++ b/components/ownership/owner_key_util_impl.cc
@@ -63,7 +63,7 @@ crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot(
crypto::FindNSSKeyFromPublicKeyInfoInSlot(key, slot));
if (!private_key || SECKEY_GetPrivateKeyType(private_key.get()) != rsaKey)
return nullptr;
- return private_key.Pass();
+ return private_key;
}
bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc
index b15609e..4990594 100644
--- a/components/ownership/owner_settings_service.cc
+++ b/components/ownership/owner_settings_service.cc
@@ -37,7 +37,7 @@ scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
new em::PolicyFetchResponse());
if (!policy->SerializeToString(policy_response->mutable_policy_data())) {
LOG(ERROR) << "Failed to encode policy payload.";
- return scoped_ptr<em::PolicyFetchResponse>(nullptr).Pass();
+ return scoped_ptr<em::PolicyFetchResponse>(nullptr);
}
ScopedSGNContext sign_context(
@@ -62,7 +62,7 @@ scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
reinterpret_cast<const char*>(signature_item.data), signature_item.len);
SECITEM_FreeItem(&signature_item, PR_FALSE);
- return policy_response.Pass();
+ return policy_response;
}
} // namepace
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index 1a6fe80..ca341d9 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -4,6 +4,8 @@
#include "components/pairing/bluetooth_controller_pairing_controller.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
@@ -132,7 +134,7 @@ void BluetoothControllerPairingController::OnGetAdapter(
void BluetoothControllerPairingController::OnStartDiscoverySession(
scoped_ptr<device::BluetoothDiscoverySession> discovery_session) {
DCHECK(thread_checker_.CalledOnValidThread());
- discovery_session_ = discovery_session.Pass();
+ discovery_session_ = std::move(discovery_session);
ChangeStage(STAGE_DEVICES_DISCOVERY);
for (const auto& device : adapter_->GetDevices())
diff --git a/components/pairing/shark_connection_listener.cc b/components/pairing/shark_connection_listener.cc
index a6bc655..961d962 100644
--- a/components/pairing/shark_connection_listener.cc
+++ b/components/pairing/shark_connection_listener.cc
@@ -4,6 +4,8 @@
#include "components/pairing/shark_connection_listener.h"
+#include <utility>
+
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
#include "components/pairing/bluetooth_host_pairing_controller.h"
@@ -25,7 +27,7 @@ SharkConnectionListener::~SharkConnectionListener() {
void SharkConnectionListener::PairingStageChanged(Stage new_stage) {
if (new_stage == HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION) {
controller_->RemoveObserver(this);
- callback_.Run(controller_.Pass());
+ callback_.Run(std::move(controller_));
callback_.Reset();
}
}
diff --git a/components/policy/core/common/proxy_policy_provider.cc b/components/policy/core/common/proxy_policy_provider.cc
index 7a89197..74f95c9 100644
--- a/components/policy/core/common/proxy_policy_provider.cc
+++ b/components/policy/core/common/proxy_policy_provider.cc
@@ -4,6 +4,8 @@
#include "components/policy/core/common/proxy_policy_provider.h"
+#include <utility>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "components/policy/core/common/policy_bundle.h"
@@ -48,7 +50,7 @@ void ProxyPolicyProvider::RefreshPolicies() {
// if SetDelegate() was never called before.
scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
bundle->CopyFrom(policies());
- UpdatePolicy(bundle.Pass());
+ UpdatePolicy(std::move(bundle));
}
}
@@ -57,7 +59,7 @@ void ProxyPolicyProvider::OnUpdatePolicy(
DCHECK_EQ(delegate_, provider);
scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
bundle->CopyFrom(delegate_->policies());
- UpdatePolicy(bundle.Pass());
+ UpdatePolicy(std::move(bundle));
}
} // namespace policy
diff --git a/components/policy/core/common/proxy_policy_provider_unittest.cc b/components/policy/core/common/proxy_policy_provider_unittest.cc
index 196f3fc..142e353 100644
--- a/components/policy/core/common/proxy_policy_provider_unittest.cc
+++ b/components/policy/core/common/proxy_policy_provider_unittest.cc
@@ -38,7 +38,7 @@ class ProxyPolicyProviderTest : public testing::Test {
static scoped_ptr<PolicyBundle> CopyBundle(const PolicyBundle& bundle) {
scoped_ptr<PolicyBundle> copy(new PolicyBundle());
copy->CopyFrom(bundle);
- return copy.Pass();
+ return copy;
}
private:
diff --git a/components/rlz/rlz_tracker.cc b/components/rlz/rlz_tracker.cc
index 00b8dd9..32284b8 100644
--- a/components/rlz/rlz_tracker.cc
+++ b/components/rlz/rlz_tracker.cc
@@ -9,6 +9,7 @@
#include "components/rlz/rlz_tracker.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
@@ -177,14 +178,14 @@ void RLZTracker::SetRlzDelegate(scoped_ptr<RLZTrackerDelegate> delegate) {
// RLZTracker::SetRlzDelegate is called at Profile creation time which can
// happens multiple time on ChromeOS, so do nothing if the delegate already
// exists.
- tracker->SetDelegate(delegate.Pass());
+ tracker->SetDelegate(std::move(delegate));
}
}
void RLZTracker::SetDelegate(scoped_ptr<RLZTrackerDelegate> delegate) {
DCHECK(delegate);
DCHECK(!delegate_);
- delegate_ = delegate.Pass();
+ delegate_ = std::move(delegate);
worker_pool_token_ = delegate_->GetBlockingPool()->GetSequenceToken();
}
diff --git a/components/storage_monitor/storage_monitor_chromeos_unittest.cc b/components/storage_monitor/storage_monitor_chromeos_unittest.cc
index 053ef14..a34c9e8 100644
--- a/components/storage_monitor/storage_monitor_chromeos_unittest.cc
+++ b/components/storage_monitor/storage_monitor_chromeos_unittest.cc
@@ -5,6 +5,7 @@
#include "components/storage_monitor/storage_monitor_chromeos.h"
#include <stdint.h>
+#include <utility>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
@@ -173,7 +174,7 @@ void StorageMonitorCrosTest::SetUp() {
TestStorageMonitor::Destroy();
monitor_ = new TestStorageMonitorCros();
scoped_ptr<StorageMonitor> pass_monitor(monitor_);
- StorageMonitor::SetStorageMonitorForTesting(pass_monitor.Pass());
+ StorageMonitor::SetStorageMonitorForTesting(std::move(pass_monitor));
monitor_->Init();
monitor_->AddObserver(mock_storage_observer_.get());
diff --git a/components/timers/alarm_timer_chromeos.cc b/components/timers/alarm_timer_chromeos.cc
index 57b1c0c..0cb25fa 100644
--- a/components/timers/alarm_timer_chromeos.cc
+++ b/components/timers/alarm_timer_chromeos.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
#include <sys/timerfd.h>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -425,7 +426,7 @@ void AlarmTimer::OnTimerFired() {
// Take ownership of the pending user task, which is going to be cleared by
// the Stop() or Reset() functions below.
- scoped_ptr<base::PendingTask> pending_user_task(pending_task_.Pass());
+ scoped_ptr<base::PendingTask> pending_user_task(std::move(pending_task_));
// Re-schedule or stop the timer as requested.
if (base::Timer::is_repeating())
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index 312aca1..487ce56 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -5,8 +5,8 @@
#include "components/user_manager/user_manager_base.h"
#include <stddef.h>
-
#include <set>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -1092,7 +1092,7 @@ void UserManagerBase::UpdateUserAccountLocale(const AccountId& account_id,
base::Passed(&resolved_locale)));
} else {
resolved_locale.reset(new std::string(locale));
- DoUpdateAccountLocale(account_id, resolved_locale.Pass());
+ DoUpdateAccountLocale(account_id, std::move(resolved_locale));
}
}
diff --git a/components/wifi_sync/wifi_credential_syncable_service.cc b/components/wifi_sync/wifi_credential_syncable_service.cc
index c8f65dd..7550853 100644
--- a/components/wifi_sync/wifi_credential_syncable_service.cc
+++ b/components/wifi_sync/wifi_credential_syncable_service.cc
@@ -5,6 +5,7 @@
#include "components/wifi_sync/wifi_credential_syncable_service.h"
#include <stdint.h>
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -107,7 +108,7 @@ const syncer::ModelType WifiCredentialSyncableService::kModelType =
WifiCredentialSyncableService::WifiCredentialSyncableService(
scoped_ptr<WifiConfigDelegate> network_config_delegate)
- : network_config_delegate_(network_config_delegate.Pass()) {
+ : network_config_delegate_(std::move(network_config_delegate)) {
DCHECK(network_config_delegate_);
}
@@ -123,7 +124,7 @@ syncer::SyncMergeResult WifiCredentialSyncableService::MergeDataAndStartSyncing(
DCHECK(sync_processor.get());
DCHECK_EQ(kModelType, type);
- sync_processor_ = sync_processor.Pass();
+ sync_processor_ = std::move(sync_processor);
// TODO(quiche): Update local WiFi configuration from |initial_sync_data|.
// TODO(quiche): Notify upper layers that sync is ready.
diff --git a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
index 81132c0..3b15dc7 100644
--- a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
+++ b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
@@ -5,8 +5,8 @@
#include "components/wifi_sync/wifi_credential_syncable_service.h"
#include <stdint.h>
-
#include <string>
+#include <utility>
#include <vector>
#include "base/macros.h"
@@ -144,7 +144,8 @@ class WifiCredentialSyncableServiceTest : public testing::Test {
change_processor_ = change_processor.get();
syncable_service_->MergeDataAndStartSyncing(
syncer::WIFI_CREDENTIALS, syncer::SyncDataList(),
- change_processor.Pass(), make_scoped_ptr(new SyncErrorFactoryMock()));
+ std::move(change_processor),
+ make_scoped_ptr(new SyncErrorFactoryMock()));
}
private: