| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.
h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 sync_task_manager_->Initialize(SYNC_STATUS_OK); | 71 sync_task_manager_->Initialize(SYNC_STATUS_OK); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void TearDown() override { | 74 void TearDown() override { |
| 75 sync_task_manager_.reset(); | 75 sync_task_manager_.reset(); |
| 76 metadata_database_.reset(); | 76 metadata_database_.reset(); |
| 77 sync_context_.reset(); | 77 sync_context_.reset(); |
| 78 base::RunLoop().RunUntilIdle(); | 78 base::RunLoop().RunUntilIdle(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 base::FilePath database_path() { | 81 base::FilePath database_path() { return database_dir_.GetPath(); } |
| 82 return database_dir_.path(); | |
| 83 } | |
| 84 | 82 |
| 85 SyncStatusCode RunInitializer() { | 83 SyncStatusCode RunInitializer() { |
| 86 SyncEngineInitializer* initializer = | 84 SyncEngineInitializer* initializer = |
| 87 new SyncEngineInitializer(sync_context_.get(), | 85 new SyncEngineInitializer(sync_context_.get(), |
| 88 database_path(), | 86 database_path(), |
| 89 in_memory_env_.get()); | 87 in_memory_env_.get()); |
| 90 SyncStatusCode status = SYNC_STATUS_UNKNOWN; | 88 SyncStatusCode status = SYNC_STATUS_UNKNOWN; |
| 91 | 89 |
| 92 sync_task_manager_->ScheduleSyncTask( | 90 sync_task_manager_->ScheduleSyncTask( |
| 93 FROM_HERE, std::unique_ptr<SyncTask>(initializer), | 91 FROM_HERE, std::unique_ptr<SyncTask>(initializer), |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 357 |
| 360 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); | 358 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); |
| 361 EXPECT_FALSE(HasNoParent(sync_root->file_id())); | 359 EXPECT_FALSE(HasNoParent(sync_root->file_id())); |
| 362 | 360 |
| 363 EXPECT_EQ(1u, CountFileMetadata()); | 361 EXPECT_EQ(1u, CountFileMetadata()); |
| 364 EXPECT_EQ(1u, CountFileTracker()); | 362 EXPECT_EQ(1u, CountFileTracker()); |
| 365 } | 363 } |
| 366 | 364 |
| 367 } // namespace drive_backend | 365 } // namespace drive_backend |
| 368 } // namespace sync_file_system | 366 } // namespace sync_file_system |
| OLD | NEW |