| 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/file_util.h" | 8 #include "base/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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 base::Bind(&MetadataDatabase::CountFileTracker, | 554 base::Bind(&MetadataDatabase::CountFileTracker, |
| 555 base::Unretained(metadata_database())), | 555 base::Unretained(metadata_database())), |
| 556 base::Bind(&SetValueAndCallClosure<size_t>, | 556 base::Bind(&SetValueAndCallClosure<size_t>, |
| 557 run_loop.QuitClosure(), &count)); | 557 run_loop.QuitClosure(), &count)); |
| 558 run_loop.Run(); | 558 run_loop.Run(); |
| 559 return count; | 559 return count; |
| 560 } | 560 } |
| 561 | 561 |
| 562 drive::FakeDriveService* fake_drive_service() { | 562 drive::FakeDriveService* fake_drive_service() { |
| 563 return static_cast<drive::FakeDriveService*>( | 563 return static_cast<drive::FakeDriveService*>( |
| 564 remote_sync_service_->GetDriveService()); | 564 remote_sync_service_->drive_service_.get()); |
| 565 } | 565 } |
| 566 | 566 |
| 567 FakeDriveServiceHelper* fake_drive_service_helper() { | 567 FakeDriveServiceHelper* fake_drive_service_helper() { |
| 568 return fake_drive_service_helper_.get(); | 568 return fake_drive_service_helper_.get(); |
| 569 } | 569 } |
| 570 | 570 |
| 571 private: | 571 private: |
| 572 // MetadataDatabase is normally used on the worker thread. | 572 // MetadataDatabase is normally used on the worker thread. |
| 573 // Use this only when there is no task running on the worker. | 573 // Use this only when there is no task running on the worker. |
| 574 MetadataDatabase* metadata_database() { | 574 MetadataDatabase* metadata_database() { |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 | 1678 |
| 1679 EXPECT_EQ(1u, CountApp()); | 1679 EXPECT_EQ(1u, CountApp()); |
| 1680 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1680 EXPECT_EQ(1u, CountLocalFile(app_id)); |
| 1681 | 1681 |
| 1682 EXPECT_EQ(2u, CountMetadata()); | 1682 EXPECT_EQ(2u, CountMetadata()); |
| 1683 EXPECT_EQ(2u, CountTracker()); | 1683 EXPECT_EQ(2u, CountTracker()); |
| 1684 } | 1684 } |
| 1685 | 1685 |
| 1686 } // namespace drive_backend | 1686 } // namespace drive_backend |
| 1687 } // namespace sync_file_system | 1687 } // namespace sync_file_system |
| OLD | NEW |