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_UPLOAD_FILE_INFO_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOAD_FILE_INFO_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOAD_FILE_INFO_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOAD_FILE_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 class DocumentEntry; | 26 class DocumentEntry; |
27 | 27 |
28 // The mode for uploading. | 28 // The mode for uploading. |
29 enum UploadMode { | 29 enum UploadMode { |
30 UPLOAD_NEW_FILE, | 30 UPLOAD_NEW_FILE, |
31 UPLOAD_EXISTING_FILE, | 31 UPLOAD_EXISTING_FILE, |
32 UPLOAD_INVALID, // Used as an invalid value. | 32 UPLOAD_INVALID, // Used as an invalid value. |
33 }; | 33 }; |
34 | 34 |
35 // Structure containing current upload information of file, passed between | 35 // Structure containing current upload information of file, passed between |
36 // DocumentsService methods and callbacks. | 36 // DriveServiceInterface methods and callbacks. |
37 struct UploadFileInfo { | 37 struct UploadFileInfo { |
38 UploadFileInfo(); | 38 UploadFileInfo(); |
39 ~UploadFileInfo(); | 39 ~UploadFileInfo(); |
40 | 40 |
41 // Bytes left to upload. | 41 // Bytes left to upload. |
42 int64 SizeRemaining() const; | 42 int64 SizeRemaining() const; |
43 | 43 |
44 // Useful for printf debugging. | 44 // Useful for printf debugging. |
45 std::string DebugString() const; | 45 std::string DebugString() const; |
46 | 46 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 // Callback to be invoked once the upload has completed. | 90 // Callback to be invoked once the upload has completed. |
91 typedef base::Callback<void(GDataFileError error, | 91 typedef base::Callback<void(GDataFileError error, |
92 scoped_ptr<UploadFileInfo> upload_file_info)> UploadCompletionCallback; | 92 scoped_ptr<UploadFileInfo> upload_file_info)> UploadCompletionCallback; |
93 UploadCompletionCallback completion_callback; | 93 UploadCompletionCallback completion_callback; |
94 }; | 94 }; |
95 | 95 |
96 } // namespace gdata | 96 } // namespace gdata |
97 | 97 |
98 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOAD_FILE_INFO_H_ | 98 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_UPLOAD_FILE_INFO_H_ |
OLD | NEW |