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

Unified Diff: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
index fe54bdc4ba76fb6baa252f1e17e2f7cc0060ac51..a0d0d2684e7700b0dec86ef71b852c09d2c21b13 100644
--- a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
@@ -61,10 +61,10 @@ class ConflictResolverTest : public testing::Test {
ASSERT_TRUE(database_dir_.CreateUniqueTempDir());
in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
- scoped_ptr<FakeDriveServiceWrapper>
- fake_drive_service(new FakeDriveServiceWrapper);
- scoped_ptr<drive::DriveUploaderInterface>
- drive_uploader(new FakeDriveUploader(fake_drive_service.get()));
+ std::unique_ptr<FakeDriveServiceWrapper> fake_drive_service(
+ new FakeDriveServiceWrapper);
+ std::unique_ptr<drive::DriveUploaderInterface> drive_uploader(
+ new FakeDriveUploader(fake_drive_service.get()));
fake_drive_helper_.reset(
new FakeDriveServiceHelper(fake_drive_service.get(),
drive_uploader.get(),
@@ -102,8 +102,7 @@ class ConflictResolverTest : public testing::Test {
in_memory_env_.get());
SyncStatusCode status = SYNC_STATUS_UNKNOWN;
sync_task_manager_->ScheduleSyncTask(
- FROM_HERE,
- scoped_ptr<SyncTask>(initializer),
+ FROM_HERE, std::unique_ptr<SyncTask>(initializer),
SyncTaskManager::PRIORITY_MED,
base::Bind(&ConflictResolverTest::DidInitializeMetadataDatabase,
base::Unretained(this), initializer, &status));
@@ -172,7 +171,7 @@ class ConflictResolverTest : public testing::Test {
}
int CountParents(const std::string& file_id) {
- scoped_ptr<google_apis::FileResource> entry;
+ std::unique_ptr<google_apis::FileResource> entry;
EXPECT_EQ(google_apis::HTTP_SUCCESS,
fake_drive_helper_->GetFileResource(file_id, &entry));
return entry->parents().size();
@@ -180,7 +179,7 @@ class ConflictResolverTest : public testing::Test {
SyncStatusCode RunRemoteToLocalSyncer() {
SyncStatusCode status = SYNC_STATUS_UNKNOWN;
- scoped_ptr<RemoteToLocalSyncer> syncer(
+ std::unique_ptr<RemoteToLocalSyncer> syncer(
new RemoteToLocalSyncer(context_.get()));
syncer->RunPreflight(SyncTaskToken::CreateForTesting(
CreateResultReceiver(&status)));
@@ -194,10 +193,10 @@ class ConflictResolverTest : public testing::Test {
base::FilePath local_path = base::FilePath(FILE_PATH_LITERAL("dummy"));
if (file_change.IsAddOrUpdate())
CreateTemporaryFileInDir(database_dir_.path(), &local_path);
- scoped_ptr<LocalToRemoteSyncer> syncer(new LocalToRemoteSyncer(
+ std::unique_ptr<LocalToRemoteSyncer> syncer(new LocalToRemoteSyncer(
context_.get(),
- SyncFileMetadata(file_change.file_type(), 0, base::Time()),
- file_change, local_path, url));
+ SyncFileMetadata(file_change.file_type(), 0, base::Time()), file_change,
+ local_path, url));
syncer->RunPreflight(SyncTaskToken::CreateForTesting(
CreateResultReceiver(&status)));
base::RunLoop().RunUntilIdle();
@@ -234,9 +233,8 @@ class ConflictResolverTest : public testing::Test {
SyncStatusCode status = SYNC_STATUS_UNKNOWN;
sync_task_manager_->ScheduleSyncTask(
FROM_HERE,
- scoped_ptr<SyncTask>(new ListChangesTask(context_.get())),
- SyncTaskManager::PRIORITY_MED,
- CreateResultReceiver(&status));
+ std::unique_ptr<SyncTask>(new ListChangesTask(context_.get())),
+ SyncTaskManager::PRIORITY_MED, CreateResultReceiver(&status));
base::RunLoop().RunUntilIdle();
return status;
}
@@ -273,13 +271,13 @@ class ConflictResolverTest : public testing::Test {
private:
content::TestBrowserThreadBundle thread_bundle_;
base::ScopedTempDir database_dir_;
- scoped_ptr<leveldb::Env> in_memory_env_;
+ std::unique_ptr<leveldb::Env> in_memory_env_;
- scoped_ptr<SyncEngineContext> context_;
- scoped_ptr<FakeDriveServiceHelper> fake_drive_helper_;
- scoped_ptr<FakeRemoteChangeProcessor> remote_change_processor_;
+ std::unique_ptr<SyncEngineContext> context_;
+ std::unique_ptr<FakeDriveServiceHelper> fake_drive_helper_;
+ std::unique_ptr<FakeRemoteChangeProcessor> remote_change_processor_;
- scoped_ptr<SyncTaskManager> sync_task_manager_;
+ std::unique_ptr<SyncTaskManager> sync_task_manager_;
DISALLOW_COPY_AND_ASSIGN(ConflictResolverTest);
};

Powered by Google App Engine
This is Rietveld 408576698