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

Unified Diff: sync/internal_api/attachments/attachment_service_impl.cc

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up 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: sync/internal_api/attachments/attachment_service_impl.cc
diff --git a/sync/internal_api/attachments/attachment_service_impl.cc b/sync/internal_api/attachments/attachment_service_impl.cc
index 6b0e6068f82a6b9ff9cddb58038ecce80052b38a..3638a839b1e5384e0fa17491cc950ae0a9068342 100644
--- a/sync/internal_api/attachments/attachment_service_impl.cc
+++ b/sync/internal_api/attachments/attachment_service_impl.cc
@@ -5,6 +5,7 @@
#include "sync/internal_api/public/attachments/attachment_service_impl.h"
#include <iterator>
+#include <utility>
#include "base/bind.h"
#include "base/macros.h"
@@ -117,9 +118,9 @@ AttachmentServiceImpl::AttachmentServiceImpl(
Delegate* delegate,
const base::TimeDelta& initial_backoff_delay,
const base::TimeDelta& max_backoff_delay)
- : attachment_store_(attachment_store.Pass()),
- attachment_uploader_(attachment_uploader.Pass()),
- attachment_downloader_(attachment_downloader.Pass()),
+ : attachment_store_(std::move(attachment_store)),
+ attachment_uploader_(std::move(attachment_uploader)),
+ attachment_downloader_(std::move(attachment_downloader)),
delegate_(delegate),
weak_ptr_factory_(this) {
DCHECK(CalledOnValidThread());
@@ -154,9 +155,9 @@ scoped_ptr<syncer::AttachmentService> AttachmentServiceImpl::CreateForTest() {
scoped_ptr<syncer::AttachmentService> attachment_service(
new syncer::AttachmentServiceImpl(
attachment_store->CreateAttachmentStoreForSync(),
- attachment_uploader.Pass(), attachment_downloader.Pass(), NULL,
- base::TimeDelta(), base::TimeDelta()));
- return attachment_service.Pass();
+ std::move(attachment_uploader), std::move(attachment_downloader),
+ NULL, base::TimeDelta(), base::TimeDelta()));
+ return attachment_service;
}
void AttachmentServiceImpl::GetOrDownloadAttachments(
@@ -327,7 +328,7 @@ void AttachmentServiceImpl::ReadDoneNowUpload(
}
void AttachmentServiceImpl::SetTimerForTest(scoped_ptr<base::Timer> timer) {
- upload_task_queue_->SetTimerForTest(timer.Pass());
+ upload_task_queue_->SetTimerForTest(std::move(timer));
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698