OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_file_sync_service.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 metadata_store_.Pass()).Pass(); | 306 metadata_store_.Pass()).Pass(); |
307 sync_service_->AddServiceObserver(&mock_remote_observer_); | 307 sync_service_->AddServiceObserver(&mock_remote_observer_); |
308 sync_service_->AddFileStatusObserver(&mock_file_status_observer_); | 308 sync_service_->AddFileStatusObserver(&mock_file_status_observer_); |
309 sync_service_->SetRemoteChangeProcessor(mock_remote_processor()); | 309 sync_service_->SetRemoteChangeProcessor(mock_remote_processor()); |
310 sync_service_->SetSyncEnabled(enabled); | 310 sync_service_->SetSyncEnabled(enabled); |
311 message_loop_.RunUntilIdle(); | 311 message_loop_.RunUntilIdle(); |
312 } | 312 } |
313 | 313 |
314 virtual void TearDown() OVERRIDE { | 314 virtual void TearDown() OVERRIDE { |
315 EXPECT_CALL(*mock_drive_service(), RemoveObserver(_)); | 315 EXPECT_CALL(*mock_drive_service(), RemoveObserver(_)); |
316 EXPECT_CALL(*mock_drive_service(), CancelAll()); | |
317 | 316 |
318 if (sync_service_) { | 317 if (sync_service_) { |
319 sync_service_.reset(); | 318 sync_service_.reset(); |
320 } | 319 } |
321 | 320 |
322 metadata_store_.reset(); | 321 metadata_store_.reset(); |
323 api_util_.reset(); | 322 api_util_.reset(); |
324 mock_drive_service_ = NULL; | 323 mock_drive_service_ = NULL; |
325 | 324 |
326 RevokeSyncableFileSystem(); | 325 RevokeSyncableFileSystem(); |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); | 1014 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); |
1016 | 1015 |
1017 // Expect to drop this change for file. | 1016 // Expect to drop this change for file. |
1018 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( | 1017 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( |
1019 kOrigin, *entry, 1)); | 1018 kOrigin, *entry, 1)); |
1020 } | 1019 } |
1021 | 1020 |
1022 #endif // !defined(OS_ANDROID) | 1021 #endif // !defined(OS_ANDROID) |
1023 | 1022 |
1024 } // namespace sync_file_system | 1023 } // namespace sync_file_system |
OLD | NEW |