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

Unified Diff: chrome/browser/sync_file_system/drive/api_util_unittest.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
« no previous file with comments | « chrome/browser/google_apis/drive_uploader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive/api_util_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive/api_util_unittest.cc b/chrome/browser/sync_file_system/drive/api_util_unittest.cc
index 53a0fc6d5030e521343a24e5cd96176d6ac75dad..ef4974801569b6fddfe2f6dc505ebfb0d6c1a206 100644
--- a/chrome/browser/sync_file_system/drive/api_util_unittest.cc
+++ b/chrome/browser/sync_file_system/drive/api_util_unittest.cc
@@ -123,7 +123,7 @@ class FakeDriveUploader : public DriveUploaderInterface {
// Pretends that a new file was uploaded successfully, and returns the
// contents of "chromeos/gdata/file_entry.json" to the caller.
- virtual void UploadNewFile(
+ virtual google_apis::CancelCallback UploadNewFile(
const std::string& parent_resource_id,
const base::FilePath& drive_file_path,
const base::FilePath& local_file_path,
@@ -152,12 +152,13 @@ class FakeDriveUploader : public DriveUploaderInterface {
google_apis::HTTP_SUCCESS,
GURL(),
base::Passed(&file_entry)));
+ return google_apis::CancelCallback();
}
// Pretends that an existing file ("file:resource_id") was uploaded
// successfully, and returns the contents of "chromeos/gdata/file_entry.json"
// to the caller.
- virtual void UploadExistingFile(
+ virtual google_apis::CancelCallback UploadExistingFile(
const std::string& resource_id,
const base::FilePath& drive_file_path,
const base::FilePath& local_file_path,
@@ -178,11 +179,12 @@ class FakeDriveUploader : public DriveUploaderInterface {
google_apis::HTTP_SUCCESS,
GURL(),
base::Passed(&file_entry)));
+ return google_apis::CancelCallback();
}
// At the moment, sync file system doesn't support resuming of the uploading.
// So this method shouldn't be reached.
- virtual void ResumeUploadFile(
+ virtual google_apis::CancelCallback ResumeUploadFile(
const GURL& upload_location,
const base::FilePath& drive_file_path,
const base::FilePath& local_file_path,
@@ -190,6 +192,7 @@ class FakeDriveUploader : public DriveUploaderInterface {
const google_apis::UploadCompletionCallback& callback,
const google_apis::ProgressCallback& progress_callback) OVERRIDE {
NOTREACHED();
+ return google_apis::CancelCallback();
}
void set_make_file_conflict(bool enable) {
« no previous file with comments | « chrome/browser/google_apis/drive_uploader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698