| 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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // DriveService callback for ResumeUpload. | 114 // DriveService callback for ResumeUpload. |
| 115 void OnResumeUploadResponseReceived(int upload_id, | 115 void OnResumeUploadResponseReceived(int upload_id, |
| 116 const ResumeUploadResponse& response, | 116 const ResumeUploadResponse& response, |
| 117 scoped_ptr<DocumentEntry> entry); | 117 scoped_ptr<DocumentEntry> entry); |
| 118 | 118 |
| 119 // Initiate the upload. | 119 // Initiate the upload. |
| 120 void InitiateUpload(UploadFileInfo* uploader_file_info); | 120 void InitiateUpload(UploadFileInfo* uploader_file_info); |
| 121 | 121 |
| 122 // Handle failed uploads. | 122 // Handle failed uploads. |
| 123 void UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info, | 123 void UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info, |
| 124 GDataFileError error); | 124 DriveFileError error); |
| 125 | 125 |
| 126 // Removes |upload_id| from UploadFileInfoMap |pending_uploads_|. | 126 // Removes |upload_id| from UploadFileInfoMap |pending_uploads_|. |
| 127 // Note that this does not delete the UploadFileInfo object itself, | 127 // Note that this does not delete the UploadFileInfo object itself, |
| 128 // because it may still be in use by an asynchronous function. | 128 // because it may still be in use by an asynchronous function. |
| 129 void RemoveUpload(int upload_id); | 129 void RemoveUpload(int upload_id); |
| 130 | 130 |
| 131 // Starts uploading a file with |upload_file_info|. Returns a new upload | 131 // Starts uploading a file with |upload_file_info|. Returns a new upload |
| 132 // ID assigned to |upload_file_info|. | 132 // ID assigned to |upload_file_info|. |
| 133 int StartUploadFile(scoped_ptr<UploadFileInfo> upload_file_info); | 133 int StartUploadFile(scoped_ptr<UploadFileInfo> upload_file_info); |
| 134 | 134 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 145 // Note: This should remain the last member so it'll be destroyed and | 145 // Note: This should remain the last member so it'll be destroyed and |
| 146 // invalidate its weak pointers before any other members are destroyed. | 146 // invalidate its weak pointers before any other members are destroyed. |
| 147 base::WeakPtrFactory<GDataUploader> weak_ptr_factory_; | 147 base::WeakPtrFactory<GDataUploader> weak_ptr_factory_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(GDataUploader); | 149 DISALLOW_COPY_AND_ASSIGN(GDataUploader); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 } // namespace gdata | 152 } // namespace gdata |
| 153 | 153 |
| 154 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ | 154 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOADER_H_ |
| OLD | NEW |