Chromium Code Reviews| 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_DRIVE_DRIVE_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_UPLOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_UPLOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_UPLOADER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 | 152 |
| 153 gdata::UploadMode upload_mode; | 153 gdata::UploadMode upload_mode; |
| 154 | 154 |
| 155 // Location URL used to get |upload_location| with InitiateUpload. | 155 // Location URL used to get |upload_location| with InitiateUpload. |
| 156 GURL initial_upload_location; | 156 GURL initial_upload_location; |
| 157 | 157 |
| 158 // Location URL where file is to be uploaded to, returned from | 158 // Location URL where file is to be uploaded to, returned from |
| 159 // InitiateUpload. Used for the subsequent ResumeUpload requests. | 159 // InitiateUpload. Used for the subsequent ResumeUpload requests. |
| 160 GURL upload_location; | 160 GURL upload_location; |
| 161 | 161 |
| 162 // ETag to match to the destination file. Leave this empty if not needed. | |
|
kochi
2012/10/16 05:04:58
nit: "match the destination file"
tzik
2012/10/16 05:48:05
Done.
| |
| 163 std::string etag; | |
| 164 | |
| 162 // Final path in gdata. Looks like /special/drive/MyFolder/MyFile. | 165 // Final path in gdata. Looks like /special/drive/MyFolder/MyFile. |
| 163 FilePath drive_path; | 166 FilePath drive_path; |
| 164 | 167 |
| 165 // TODO(achuith): Use generic stream object after FileStream is refactored | 168 // TODO(achuith): Use generic stream object after FileStream is refactored |
| 166 // to extend a generic stream. | 169 // to extend a generic stream. |
| 167 // | 170 // |
| 168 // For opening and reading from physical file. | 171 // For opening and reading from physical file. |
| 169 scoped_ptr<net::FileStream> file_stream; | 172 scoped_ptr<net::FileStream> file_stream; |
| 170 scoped_refptr<net::IOBuffer> buf; // Holds current content to be uploaded. | 173 scoped_refptr<net::IOBuffer> buf; // Holds current content to be uploaded. |
| 171 // Size of |buf|, max is 512KB; Google Docs requires size of each upload | 174 // Size of |buf|, max is 512KB; Google Docs requires size of each upload |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 // Note: This should remain the last member so it'll be destroyed and | 271 // Note: This should remain the last member so it'll be destroyed and |
| 269 // invalidate its weak pointers before any other members are destroyed. | 272 // invalidate its weak pointers before any other members are destroyed. |
| 270 base::WeakPtrFactory<DriveUploader> weak_ptr_factory_; | 273 base::WeakPtrFactory<DriveUploader> weak_ptr_factory_; |
| 271 | 274 |
| 272 DISALLOW_COPY_AND_ASSIGN(DriveUploader); | 275 DISALLOW_COPY_AND_ASSIGN(DriveUploader); |
| 273 }; | 276 }; |
| 274 | 277 |
| 275 } // namespace drive | 278 } // namespace drive |
| 276 | 279 |
| 277 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_UPLOADER_H_ | 280 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_UPLOADER_H_ |
| OLD | NEW |