| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 scoped_ptr<google_apis::ResourceEntry> file_entry | 559 scoped_ptr<google_apis::ResourceEntry> file_entry |
| 560 = google_apis::ResourceEntry::ExtractAndParse(*file_entry_value); | 560 = google_apis::ResourceEntry::ExtractAndParse(*file_entry_value); |
| 561 EXPECT_CALL(*mock_drive_service(), | 561 EXPECT_CALL(*mock_drive_service(), |
| 562 GetResourceEntry(file_resource_id, _)) | 562 GetResourceEntry(file_resource_id, _)) |
| 563 .WillOnce(InvokeGetResourceEntryCallback1( | 563 .WillOnce(InvokeGetResourceEntryCallback1( |
| 564 google_apis::HTTP_SUCCESS, | 564 google_apis::HTTP_SUCCESS, |
| 565 base::Passed(&file_entry))) | 565 base::Passed(&file_entry))) |
| 566 .RetiresOnSaturation(); | 566 .RetiresOnSaturation(); |
| 567 | 567 |
| 568 EXPECT_CALL(*mock_drive_service(), | 568 EXPECT_CALL(*mock_drive_service(), |
| 569 DownloadFile(_, _, GURL("https://file_content_url"), _, _)) | 569 DownloadFile(_, _, GURL("https://file_content_url"), _, _, _)) |
| 570 .WillOnce(InvokeDidDownloadFile()) | 570 .WillOnce(InvokeDidDownloadFile()) |
| 571 .RetiresOnSaturation(); | 571 .RetiresOnSaturation(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void SetUpDriveServiceExpectCallsForAddNewDirectory( | 574 void SetUpDriveServiceExpectCallsForAddNewDirectory( |
| 575 const std::string& parent_directory, | 575 const std::string& parent_directory, |
| 576 const std::string& directory_name) { | 576 const std::string& directory_name) { |
| 577 scoped_ptr<Value> origin_directory_created_value(LoadJSONFile( | 577 scoped_ptr<Value> origin_directory_created_value(LoadJSONFile( |
| 578 "chromeos/sync_file_system/origin_directory_created.json")); | 578 "chromeos/sync_file_system/origin_directory_created.json")); |
| 579 scoped_ptr<google_apis::ResourceEntry> origin_directory_created | 579 scoped_ptr<google_apis::ResourceEntry> origin_directory_created |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); | 1171 entry->set_kind(google_apis::ENTRY_KIND_FOLDER); |
| 1172 | 1172 |
| 1173 // Expect to drop this change for file. | 1173 // Expect to drop this change for file. |
| 1174 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( | 1174 EXPECT_FALSE(AppendIncrementalRemoteChangeByEntry( |
| 1175 kOrigin, *entry, 1)); | 1175 kOrigin, *entry, 1)); |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 #endif // !defined(OS_ANDROID) | 1178 #endif // !defined(OS_ANDROID) |
| 1179 | 1179 |
| 1180 } // namespace sync_file_system | 1180 } // namespace sync_file_system |
| OLD | NEW |