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/gdata_wapi_requests.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_requests.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/task_runner_util.h" | 9 #include "base/task_runner_util.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 DCHECK(!callback.is_null()); | 704 DCHECK(!callback.is_null()); |
705 } | 705 } |
706 | 706 |
707 GetUploadStatusRequest::~GetUploadStatusRequest() {} | 707 GetUploadStatusRequest::~GetUploadStatusRequest() {} |
708 | 708 |
709 void GetUploadStatusRequest::OnRangeRequestComplete( | 709 void GetUploadStatusRequest::OnRangeRequestComplete( |
710 const UploadRangeResponse& response, scoped_ptr<base::Value> value) { | 710 const UploadRangeResponse& response, scoped_ptr<base::Value> value) { |
711 callback_.Run(response, ParseResourceEntry(value.Pass())); | 711 callback_.Run(response, ParseResourceEntry(value.Pass())); |
712 } | 712 } |
713 | 713 |
| 714 |
| 715 //========================== DownloadFileRequest ========================== |
| 716 |
| 717 DownloadFileRequest::DownloadFileRequest( |
| 718 RequestSender* sender, |
| 719 const GDataWapiUrlGenerator& url_generator, |
| 720 const DownloadActionCallback& download_action_callback, |
| 721 const GetContentCallback& get_content_callback, |
| 722 const ProgressCallback& progress_callback, |
| 723 const std::string& resource_id, |
| 724 const base::FilePath& output_file_path) |
| 725 : DownloadFileRequestBase( |
| 726 sender, |
| 727 download_action_callback, |
| 728 get_content_callback, |
| 729 progress_callback, |
| 730 url_generator.GenerateDownloadFileUrl(resource_id), |
| 731 output_file_path) { |
| 732 } |
| 733 |
| 734 DownloadFileRequest::~DownloadFileRequest() { |
| 735 } |
| 736 |
714 } // namespace google_apis | 737 } // namespace google_apis |
OLD | NEW |