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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 }; | 43 }; |
44 | 44 |
45 // A fake implementation of DriveUploaderInterface, which provides fake | 45 // A fake implementation of DriveUploaderInterface, which provides fake |
46 // behaviors for file uploading. | 46 // behaviors for file uploading. |
47 class FakeDriveUploader : public drive::DriveUploaderInterface { | 47 class FakeDriveUploader : public drive::DriveUploaderInterface { |
48 public: | 48 public: |
49 explicit FakeDriveUploader(FakeDriveServiceWrapper* fake_drive_service); | 49 explicit FakeDriveUploader(FakeDriveServiceWrapper* fake_drive_service); |
50 ~FakeDriveUploader() override; | 50 ~FakeDriveUploader() override; |
51 | 51 |
52 // DriveUploaderInterface overrides. | 52 // DriveUploaderInterface overrides. |
| 53 void StartBatchProcessing() override; |
| 54 void StopBatchProcessing() override; |
53 google_apis::CancelCallback UploadNewFile( | 55 google_apis::CancelCallback UploadNewFile( |
54 const std::string& parent_resource_id, | 56 const std::string& parent_resource_id, |
55 const base::FilePath& local_file_path, | 57 const base::FilePath& local_file_path, |
56 const std::string& title, | 58 const std::string& title, |
57 const std::string& content_type, | 59 const std::string& content_type, |
58 const drive::UploadNewFileOptions& options, | 60 const drive::UploadNewFileOptions& options, |
59 const drive::UploadCompletionCallback& callback, | 61 const drive::UploadCompletionCallback& callback, |
60 const google_apis::ProgressCallback& progress_callback) override; | 62 const google_apis::ProgressCallback& progress_callback) override; |
61 google_apis::CancelCallback UploadExistingFile( | 63 google_apis::CancelCallback UploadExistingFile( |
62 const std::string& resource_id, | 64 const std::string& resource_id, |
(...skipping 17 matching lines...) Expand all Loading... |
80 FakeDriveServiceWrapper* fake_drive_service_; | 82 FakeDriveServiceWrapper* fake_drive_service_; |
81 bool make_file_conflict_; | 83 bool make_file_conflict_; |
82 | 84 |
83 DISALLOW_COPY_AND_ASSIGN(FakeDriveUploader); | 85 DISALLOW_COPY_AND_ASSIGN(FakeDriveUploader); |
84 }; | 86 }; |
85 | 87 |
86 } // namespace drive_backend | 88 } // namespace drive_backend |
87 } // namespace sync_file_system | 89 } // namespace sync_file_system |
88 | 90 |
89 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ | 91 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_FAKE_DRIVE_UPLOADER_H_ |
OLD | NEW |