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

Side by Side Diff: chrome/browser/chromeos/drive/drive_scheduler.cc

Issue 14215003: Add ProgressCallback to DriveServiceInterface::DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/drive/drive_scheduler.h" 5 #include "chrome/browser/chromeos/drive/drive_scheduler.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 break; 578 break;
579 579
580 case TYPE_DOWNLOAD_FILE: { 580 case TYPE_DOWNLOAD_FILE: {
581 drive_service_->DownloadFile( 581 drive_service_->DownloadFile(
582 entry->virtual_path, 582 entry->virtual_path,
583 entry->local_cache_path, 583 entry->local_cache_path,
584 entry->download_url, 584 entry->download_url,
585 base::Bind(&DriveScheduler::OnDownloadActionJobDone, 585 base::Bind(&DriveScheduler::OnDownloadActionJobDone,
586 weak_ptr_factory_.GetWeakPtr(), 586 weak_ptr_factory_.GetWeakPtr(),
587 base::Passed(&queue_entry)), 587 base::Passed(&queue_entry)),
588 entry->get_content_callback); 588 entry->get_content_callback,
589 google_apis::ProgressCallback());
589 } 590 }
590 break; 591 break;
591 592
592 case TYPE_UPLOAD_NEW_FILE: { 593 case TYPE_UPLOAD_NEW_FILE: {
593 uploader_->UploadNewFile( 594 uploader_->UploadNewFile(
594 entry->resource_id, 595 entry->resource_id,
595 entry->drive_file_path, 596 entry->drive_file_path,
596 entry->local_file_path, 597 entry->local_file_path,
597 entry->title, 598 entry->title,
598 entry->content_type, 599 entry->content_type,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 case TYPE_DOWNLOAD_FILE: 902 case TYPE_DOWNLOAD_FILE:
902 case TYPE_UPLOAD_NEW_FILE: 903 case TYPE_UPLOAD_NEW_FILE:
903 case TYPE_UPLOAD_EXISTING_FILE: 904 case TYPE_UPLOAD_EXISTING_FILE:
904 return FILE_QUEUE; 905 return FILE_QUEUE;
905 } 906 }
906 NOTREACHED(); 907 NOTREACHED();
907 return FILE_QUEUE; 908 return FILE_QUEUE;
908 } 909 }
909 910
910 } // namespace drive 911 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698