Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc

Issue 14215003: Add ProgressCallback to DriveServiceInterface::DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698