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

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

Issue 13927002: Add callback for upload progress in Drive service and operation layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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_service.h" 5 #include "chrome/browser/google_apis/gdata_wapi_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 void GDataWapiService::ResumeUpload( 527 void GDataWapiService::ResumeUpload(
528 UploadMode upload_mode, 528 UploadMode upload_mode,
529 const base::FilePath& drive_file_path, 529 const base::FilePath& drive_file_path,
530 const GURL& upload_url, 530 const GURL& upload_url,
531 int64 start_position, 531 int64 start_position,
532 int64 end_position, 532 int64 end_position,
533 int64 content_length, 533 int64 content_length,
534 const std::string& content_type, 534 const std::string& content_type,
535 const scoped_refptr<net::IOBuffer>& buf, 535 const scoped_refptr<net::IOBuffer>& buf,
536 const UploadRangeCallback& callback) { 536 const UploadRangeCallback& callback,
537 const ProgressCallback& progress_callback) {
537 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 538 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
538 DCHECK(!callback.is_null()); 539 DCHECK(!callback.is_null());
539 540
540 runner_->StartOperationWithRetry( 541 runner_->StartOperationWithRetry(
541 new ResumeUploadOperation(operation_registry(), 542 new ResumeUploadOperation(operation_registry(),
542 url_request_context_getter_, 543 url_request_context_getter_,
543 callback, 544 callback,
545 progress_callback,
544 upload_mode, 546 upload_mode,
545 drive_file_path, 547 drive_file_path,
546 upload_url, 548 upload_url,
547 start_position, 549 start_position,
548 end_position, 550 end_position,
549 content_length, 551 content_length,
550 content_type, 552 content_type,
551 buf)); 553 buf));
552 } 554 }
553 555
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 626 }
625 627
626 void GDataWapiService::OnProgressUpdate( 628 void GDataWapiService::OnProgressUpdate(
627 const OperationProgressStatusList& list) { 629 const OperationProgressStatusList& list) {
628 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 630 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
629 FOR_EACH_OBSERVER( 631 FOR_EACH_OBSERVER(
630 DriveServiceObserver, observers_, OnProgressUpdate(list)); 632 DriveServiceObserver, observers_, OnProgressUpdate(list));
631 } 633 }
632 634
633 } // namespace google_apis 635 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_service.h ('k') | chrome/browser/google_apis/mock_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698