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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 nullptr, // drive_service | 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.Pass(), uploader.Pass(), nullptr /* sync_worker */); |
133 uploader.Pass(), nullptr /* sync_worker */); | |
134 remote_sync_service_->SetSyncEnabled(true); | 133 remote_sync_service_->SetSyncEnabled(true); |
135 | 134 |
136 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); | 135 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); |
137 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); | 136 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); |
138 } | 137 } |
139 | 138 |
140 virtual void TearDown() override { | 139 virtual void TearDown() override { |
141 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; | 140 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; |
142 for (iterator itr = file_systems_.begin(); | 141 for (iterator itr = file_systems_.begin(); |
143 itr != file_systems_.end(); ++itr) { | 142 itr != file_systems_.end(); ++itr) { |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 | 1720 |
1722 EXPECT_EQ(1u, CountApp()); | 1721 EXPECT_EQ(1u, CountApp()); |
1723 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1722 EXPECT_EQ(1u, CountLocalFile(app_id)); |
1724 | 1723 |
1725 EXPECT_EQ(2u, CountMetadata()); | 1724 EXPECT_EQ(2u, CountMetadata()); |
1726 EXPECT_EQ(2u, CountTracker()); | 1725 EXPECT_EQ(2u, CountTracker()); |
1727 } | 1726 } |
1728 | 1727 |
1729 } // namespace drive_backend | 1728 } // namespace drive_backend |
1730 } // namespace sync_file_system | 1729 } // namespace sync_file_system |
OLD | NEW |