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

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: 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 be5af274ab1844dfa3dda6d54c782bb13062b358..faa40167739832499800bda5e612520ede4344b9 100644
--- a/sync/internal_api/attachments/attachment_service_impl.cc
+++ b/sync/internal_api/attachments/attachment_service_impl.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/public/attachments/attachment_service_impl.h"
-
#include <iterator>
+#include <utility>
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "sync/api/attachments/attachment.h"
+#include "sync/internal_api/public/attachments/attachment_service_impl.h"
Nicolas Zea 2015/12/18 23:46:54 Keep up top
#include "sync/internal_api/public/attachments/fake_attachment_downloader.h"
#include "sync/internal_api/public/attachments/fake_attachment_uploader.h"
@@ -116,9 +116,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());
@@ -153,9 +153,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(
@@ -326,7 +326,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