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_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 // Performs the operation for resuming the upload of a file. | 429 // Performs the operation for resuming the upload of a file. |
430 class ResumeUploadOperation : public ResumeUploadOperationBase { | 430 class ResumeUploadOperation : public ResumeUploadOperationBase { |
431 public: | 431 public: |
432 // See also ResumeUploadOperationBase's comment for parameters meaining. | 432 // See also ResumeUploadOperationBase's comment for parameters meaining. |
433 // |callback| must not be null. | 433 // |callback| must not be null. |
434 ResumeUploadOperation( | 434 ResumeUploadOperation( |
435 OperationRegistry* registry, | 435 OperationRegistry* registry, |
436 net::URLRequestContextGetter* url_request_context_getter, | 436 net::URLRequestContextGetter* url_request_context_getter, |
437 const UploadRangeCallback& callback, | 437 const UploadRangeCallback& callback, |
| 438 const ProgressCallback& progress_callback, |
438 UploadMode upload_mode, | 439 UploadMode upload_mode, |
439 const base::FilePath& drive_file_path, | 440 const base::FilePath& drive_file_path, |
440 const GURL& upload_location, | 441 const GURL& upload_location, |
441 int64 start_position, | 442 int64 start_position, |
442 int64 end_position, | 443 int64 end_position, |
443 int64 content_length, | 444 int64 content_length, |
444 const std::string& content_type, | 445 const std::string& content_type, |
445 const scoped_refptr<net::IOBuffer>& buf); | 446 const scoped_refptr<net::IOBuffer>& buf); |
446 virtual ~ResumeUploadOperation(); | 447 virtual ~ResumeUploadOperation(); |
447 | 448 |
448 protected: | 449 protected: |
449 // UploadRangeOperationBase overrides. | 450 // UploadRangeOperationBase overrides. |
450 virtual void OnRangeOperationComplete( | 451 virtual void OnRangeOperationComplete( |
451 const UploadRangeResponse& response, | 452 const UploadRangeResponse& response, |
452 scoped_ptr<base::Value> value) OVERRIDE; | 453 scoped_ptr<base::Value> value) OVERRIDE; |
453 | 454 |
454 private: | 455 private: |
455 const UploadRangeCallback callback_; | 456 const UploadRangeCallback callback_; |
| 457 const ProgressCallback progress_callback_; |
456 | 458 |
457 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); | 459 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); |
458 }; | 460 }; |
459 | 461 |
460 //========================== GetUploadStatusOperation ========================== | 462 //========================== GetUploadStatusOperation ========================== |
461 | 463 |
462 // This class performs the operation for getting the current upload status | 464 // This class performs the operation for getting the current upload status |
463 // of a file. | 465 // of a file. |
464 // This operation calls |callback| with: | 466 // This operation calls |callback| with: |
465 // - HTTP_RESUME_INCOMPLETE and the range of previously uploaded data, | 467 // - HTTP_RESUME_INCOMPLETE and the range of previously uploaded data, |
(...skipping 30 matching lines...) Expand all Loading... |
496 private: | 498 private: |
497 const UploadRangeCallback callback_; | 499 const UploadRangeCallback callback_; |
498 const int64 content_length_; | 500 const int64 content_length_; |
499 | 501 |
500 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusOperation); | 502 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusOperation); |
501 }; | 503 }; |
502 | 504 |
503 } // namespace google_apis | 505 } // namespace google_apis |
504 | 506 |
505 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 507 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
OLD | NEW |