Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_requests.cc

Issue 18211008: Add resource ID based download requests in {GDataWapi/Drive} requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reorder parameters. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_requests.h ('k') | chrome/browser/google_apis/gdata_wapi_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698