| 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/conflict_resolver.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 NULL, | 74 NULL, |
| 75 base::MessageLoopProxy::current(), | 75 base::MessageLoopProxy::current(), |
| 76 base::MessageLoopProxy::current(), | 76 base::MessageLoopProxy::current(), |
| 77 base::MessageLoopProxy::current())); | 77 base::MessageLoopProxy::current())); |
| 78 context_->SetRemoteChangeProcessor(remote_change_processor_.get()); | 78 context_->SetRemoteChangeProcessor(remote_change_processor_.get()); |
| 79 | 79 |
| 80 RegisterSyncableFileSystem(); | 80 RegisterSyncableFileSystem(); |
| 81 | 81 |
| 82 sync_task_manager_.reset(new SyncTaskManager( | 82 sync_task_manager_.reset(new SyncTaskManager( |
| 83 base::WeakPtr<SyncTaskManager::Client>(), | 83 base::WeakPtr<SyncTaskManager::Client>(), |
| 84 10 /* maximum_background_task */)); | 84 10 /* maximum_background_task */, |
| 85 base::MessageLoopProxy::current())); |
| 85 sync_task_manager_->Initialize(SYNC_STATUS_OK); | 86 sync_task_manager_->Initialize(SYNC_STATUS_OK); |
| 86 } | 87 } |
| 87 | 88 |
| 88 virtual void TearDown() OVERRIDE { | 89 virtual void TearDown() OVERRIDE { |
| 89 sync_task_manager_.reset(); | 90 sync_task_manager_.reset(); |
| 90 RevokeSyncableFileSystem(); | 91 RevokeSyncableFileSystem(); |
| 91 fake_drive_helper_.reset(); | 92 fake_drive_helper_.reset(); |
| 92 context_.reset(); | 93 context_.reset(); |
| 93 base::RunLoop().RunUntilIdle(); | 94 base::RunLoop().RunUntilIdle(); |
| 94 } | 95 } |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 511 |
| 511 EXPECT_EQ(4, CountParents(file)); | 512 EXPECT_EQ(4, CountParents(file)); |
| 512 | 513 |
| 513 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver()); | 514 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver()); |
| 514 | 515 |
| 515 EXPECT_EQ(1, CountParents(file)); | 516 EXPECT_EQ(1, CountParents(file)); |
| 516 } | 517 } |
| 517 | 518 |
| 518 } // namespace drive_backend | 519 } // namespace drive_backend |
| 519 } // namespace sync_file_system | 520 } // namespace sync_file_system |
| OLD | NEW |