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 #include "chrome/browser/google_apis/drive_api_requests.h" | 5 #include "chrome/browser/google_apis/drive_api_requests.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 GetUploadStatusRequest::~GetUploadStatusRequest() {} | 625 GetUploadStatusRequest::~GetUploadStatusRequest() {} |
626 | 626 |
627 void GetUploadStatusRequest::OnRangeRequestComplete( | 627 void GetUploadStatusRequest::OnRangeRequestComplete( |
628 const UploadRangeResponse& response, | 628 const UploadRangeResponse& response, |
629 scoped_ptr<base::Value> value) { | 629 scoped_ptr<base::Value> value) { |
630 DCHECK(CalledOnValidThread()); | 630 DCHECK(CalledOnValidThread()); |
631 ParseFileResourceWithUploadRangeAndRun(callback_, response, value.Pass()); | 631 ParseFileResourceWithUploadRangeAndRun(callback_, response, value.Pass()); |
632 } | 632 } |
633 | 633 |
| 634 //========================== DownloadFileRequest ========================== |
| 635 |
| 636 DownloadFileRequest::DownloadFileRequest( |
| 637 RequestSender* sender, |
| 638 const DriveApiUrlGenerator& url_generator, |
| 639 const std::string& resource_id, |
| 640 const base::FilePath& output_file_path, |
| 641 const DownloadActionCallback& download_action_callback, |
| 642 const GetContentCallback& get_content_callback, |
| 643 const ProgressCallback& progress_callback) |
| 644 : DownloadFileRequestBase( |
| 645 sender, |
| 646 download_action_callback, |
| 647 get_content_callback, |
| 648 progress_callback, |
| 649 url_generator.GenerateDownloadFileUrl(resource_id), |
| 650 output_file_path) { |
| 651 } |
| 652 |
| 653 DownloadFileRequest::~DownloadFileRequest() { |
| 654 } |
| 655 |
634 } // namespace drive | 656 } // namespace drive |
635 } // namespace google_apis | 657 } // namespace google_apis |
OLD | NEW |