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

Unified Diff: chrome/browser/google_apis/drive_uploader.cc

Issue 17227003: Change google_apis::DriveUploader interface to return CancelCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/drive_uploader.cc
diff --git a/chrome/browser/google_apis/drive_uploader.cc b/chrome/browser/google_apis/drive_uploader.cc
index 11953d7c2f10bcc61f6141b142c47b814d737f73..667fb47f0d3cdba309b64b8bf7d165f31d64d1b1 100644
--- a/chrome/browser/google_apis/drive_uploader.cc
+++ b/chrome/browser/google_apis/drive_uploader.cc
@@ -106,13 +106,14 @@ DriveUploader::DriveUploader(DriveServiceInterface* drive_service)
DriveUploader::~DriveUploader() {}
-void DriveUploader::UploadNewFile(const std::string& parent_resource_id,
- const base::FilePath& drive_file_path,
- const base::FilePath& local_file_path,
- const std::string& title,
- const std::string& content_type,
- const UploadCompletionCallback& callback,
- const ProgressCallback& progress_callback) {
+CancelCallback DriveUploader::UploadNewFile(
+ const std::string& parent_resource_id,
+ const base::FilePath& drive_file_path,
+ const base::FilePath& local_file_path,
+ const std::string& title,
+ const std::string& content_type,
+ const UploadCompletionCallback& callback,
+ const ProgressCallback& progress_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!parent_resource_id.empty());
DCHECK(!drive_file_path.empty());
@@ -131,9 +132,11 @@ void DriveUploader::UploadNewFile(const std::string& parent_resource_id,
weak_ptr_factory_.GetWeakPtr(),
parent_resource_id,
title));
+ // TODO(kinaba): crbug.com/250712 Return a proper CancelCallback.
+ return CancelCallback();
}
-void DriveUploader::UploadExistingFile(
+CancelCallback DriveUploader::UploadExistingFile(
const std::string& resource_id,
const base::FilePath& drive_file_path,
const base::FilePath& local_file_path,
@@ -158,9 +161,11 @@ void DriveUploader::UploadExistingFile(
weak_ptr_factory_.GetWeakPtr(),
resource_id,
etag));
+ // TODO(kinaba): crbug.com/250712 Return a proper CancelCallback.
+ return CancelCallback();
}
-void DriveUploader::ResumeUploadFile(
+CancelCallback DriveUploader::ResumeUploadFile(
const GURL& upload_location,
const base::FilePath& drive_file_path,
const base::FilePath& local_file_path,
@@ -182,6 +187,8 @@ void DriveUploader::ResumeUploadFile(
upload_file_info.Pass(),
base::Bind(&DriveUploader::StartGetUploadStatus,
weak_ptr_factory_.GetWeakPtr()));
+ // TODO(kinaba): crbug.com/250712 Return a proper CancelCallback.
+ return CancelCallback();
}
void DriveUploader::StartUploadFile(
« no previous file with comments | « chrome/browser/google_apis/drive_uploader.h ('k') | chrome/browser/sync_file_system/drive/api_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698