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_client.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_client.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 google_apis::HTTP_SUCCESS, | 764 google_apis::HTTP_SUCCESS, |
765 base::Passed(&file_entry))) | 765 base::Passed(&file_entry))) |
766 .RetiresOnSaturation(); | 766 .RetiresOnSaturation(); |
767 | 767 |
768 // Expect to call DriveUploaderInterface::DownloadFile from | 768 // Expect to call DriveUploaderInterface::DownloadFile from |
769 // DidGetResourceEntryForDownloadFile. | 769 // DidGetResourceEntryForDownloadFile. |
770 EXPECT_CALL(*mock_drive_service(), | 770 EXPECT_CALL(*mock_drive_service(), |
771 DownloadFile(_, // drive_path | 771 DownloadFile(_, // drive_path |
772 kLocalFilePath, | 772 kLocalFilePath, |
773 file_entry_copy->download_url(), | 773 file_entry_copy->download_url(), |
774 _, _)) | 774 _, _, _)) |
775 .WillOnce(InvokeDownloadActionCallback3(google_apis::HTTP_SUCCESS, | 775 .WillOnce(InvokeDownloadActionCallback3(google_apis::HTTP_SUCCESS, |
776 kLocalFilePath)) | 776 kLocalFilePath)) |
777 .RetiresOnSaturation(); | 777 .RetiresOnSaturation(); |
778 | 778 |
779 bool done = false; | 779 bool done = false; |
780 std::string file_md5; | 780 std::string file_md5; |
781 GDataErrorCode error = google_apis::GDATA_OTHER_ERROR; | 781 GDataErrorCode error = google_apis::GDATA_OTHER_ERROR; |
782 sync_client()->DownloadFile(kResourceId, | 782 sync_client()->DownloadFile(kResourceId, |
783 kLocalFileMD5, | 783 kLocalFileMD5, |
784 kLocalFilePath, | 784 kLocalFilePath, |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 base::Bind(&DidDeleteFile, &done, &error)); | 1010 base::Bind(&DidDeleteFile, &done, &error)); |
1011 message_loop()->RunUntilIdle(); | 1011 message_loop()->RunUntilIdle(); |
1012 | 1012 |
1013 EXPECT_TRUE(done); | 1013 EXPECT_TRUE(done); |
1014 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); | 1014 EXPECT_EQ(google_apis::HTTP_CONFLICT, error); |
1015 } | 1015 } |
1016 | 1016 |
1017 #endif // !defined(OS_ANDROID) | 1017 #endif // !defined(OS_ANDROID) |
1018 | 1018 |
1019 } // namespace sync_file_system | 1019 } // namespace sync_file_system |
OLD | NEW |