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

Side by Side Diff: chrome/browser/google_apis/drive_api_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/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
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
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_requests.h ('k') | chrome/browser/google_apis/drive_api_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698