OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 #include <stack> | 6 #include <stack> |
7 | 7 |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 new SyncEngine(base::ThreadTaskRunnerHandle::Get(), // ui_task_runner | 118 new SyncEngine(base::ThreadTaskRunnerHandle::Get(), // ui_task_runner |
119 worker_task_runner_.get(), | 119 worker_task_runner_.get(), |
120 drive_task_runner.get(), | 120 drive_task_runner.get(), |
121 base_dir_.path(), | 121 base_dir_.path(), |
122 nullptr, // task_logger | 122 nullptr, // task_logger |
123 nullptr, // notification_manager | 123 nullptr, // notification_manager |
124 nullptr, // extension_service | 124 nullptr, // extension_service |
125 nullptr, // signin_manager | 125 nullptr, // signin_manager |
126 nullptr, // token_service | 126 nullptr, // token_service |
127 nullptr, // request_context | 127 nullptr, // request_context |
128 scoped_ptr<SyncEngine::DriveServiceFactory>(), | 128 nullptr, // drive_service |
129 in_memory_env_.get())); | 129 in_memory_env_.get())); |
130 remote_sync_service_->AddServiceObserver(this); | 130 remote_sync_service_->AddServiceObserver(this); |
131 remote_sync_service_->InitializeForTesting( | 131 remote_sync_service_->InitializeForTesting( |
132 drive_service.PassAs<drive::DriveServiceInterface>(), | 132 drive_service.PassAs<drive::DriveServiceInterface>(), |
133 uploader.Pass(), | 133 uploader.Pass(), nullptr /* sync_worker */); |
134 scoped_ptr<SyncWorkerInterface>()); | |
135 remote_sync_service_->SetSyncEnabled(true); | 134 remote_sync_service_->SetSyncEnabled(true); |
136 | 135 |
137 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); | 136 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); |
138 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); | 137 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); |
139 } | 138 } |
140 | 139 |
141 virtual void TearDown() OVERRIDE { | 140 virtual void TearDown() OVERRIDE { |
142 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; | 141 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; |
143 for (iterator itr = file_systems_.begin(); | 142 for (iterator itr = file_systems_.begin(); |
144 itr != file_systems_.end(); ++itr) { | 143 itr != file_systems_.end(); ++itr) { |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 | 1721 |
1723 EXPECT_EQ(1u, CountApp()); | 1722 EXPECT_EQ(1u, CountApp()); |
1724 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1723 EXPECT_EQ(1u, CountLocalFile(app_id)); |
1725 | 1724 |
1726 EXPECT_EQ(2u, CountMetadata()); | 1725 EXPECT_EQ(2u, CountMetadata()); |
1727 EXPECT_EQ(2u, CountTracker()); | 1726 EXPECT_EQ(2u, CountTracker()); |
1728 } | 1727 } |
1729 | 1728 |
1730 } // namespace drive_backend | 1729 } // namespace drive_backend |
1731 } // namespace sync_file_system | 1730 } // namespace sync_file_system |
OLD | NEW |