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

Unified Diff: components/sync_driver/generic_change_processor_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/sync_driver/generic_change_processor_unittest.cc
diff --git a/components/sync_driver/generic_change_processor_unittest.cc b/components/sync_driver/generic_change_processor_unittest.cc
index 17fd06d80a2f7eb8af59c1aa4efee1a474a7d6ca..11ad9a3bbbd4253ee5aef74c1205a0bd5851a33e 100644
--- a/components/sync_driver/generic_change_processor_unittest.cc
+++ b/components/sync_driver/generic_change_processor_unittest.cc
@@ -5,8 +5,8 @@
#include "components/sync_driver/generic_change_processor.h"
#include <stddef.h>
-
#include <string>
+#include <utility>
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -56,15 +56,14 @@ class MockAttachmentService : public syncer::AttachmentServiceImpl {
MockAttachmentService::MockAttachmentService(
scoped_ptr<syncer::AttachmentStoreForSync> attachment_store)
- : AttachmentServiceImpl(attachment_store.Pass(),
+ : AttachmentServiceImpl(std::move(attachment_store),
scoped_ptr<syncer::AttachmentUploader>(
new syncer::FakeAttachmentUploader),
scoped_ptr<syncer::AttachmentDownloader>(
new syncer::FakeAttachmentDownloader),
NULL,
base::TimeDelta(),
- base::TimeDelta()) {
-}
+ base::TimeDelta()) {}
MockAttachmentService::~MockAttachmentService() {
}
@@ -120,13 +119,13 @@ class MockSyncApiComponentFactory : public SyncApiComponentFactory {
syncer::ModelType model_type,
syncer::AttachmentService::Delegate* delegate) override {
scoped_ptr<MockAttachmentService> attachment_service(
- new MockAttachmentService(attachment_store.Pass()));
+ new MockAttachmentService(std::move(attachment_store)));
// GenericChangeProcessor takes ownership of the AttachmentService, but we
// need to have a pointer to it so we can see that it was used properly.
// Take a pointer and trust that GenericChangeProcessor does not prematurely
// destroy it.
mock_attachment_service_ = attachment_service.get();
- return attachment_service.Pass();
+ return std::move(attachment_service);
}
MockAttachmentService* GetMockAttachmentService() {
« no previous file with comments | « components/sync_driver/generic_change_processor_factory.cc ('k') | components/sync_driver/glue/sync_backend_host_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698