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

Unified Diff: chrome/browser/chromeos/gdata/gdata_uploader.h

Issue 10540132: gdata: Convert GDataFileSystem::AddUploadFile() to asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to explain why Patch Set #11 is necesary. Created 8 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/chromeos/gdata/gdata_uploader.h
diff --git a/chrome/browser/chromeos/gdata/gdata_uploader.h b/chrome/browser/chromeos/gdata/gdata_uploader.h
index b3bb8da3c5b1fa3770e030a813f1ed40febb7444..6a6be7a59ecc4141843f4ad9321990e6b3594da5 100644
--- a/chrome/browser/chromeos/gdata/gdata_uploader.h
+++ b/chrome/browser/chromeos/gdata/gdata_uploader.h
@@ -43,10 +43,6 @@ class GDataUploader {
// Returns the count of bytes confirmed as uploaded so far.
int64 GetUploadedBytes(int upload_id) const;
- // TODO(achuith): Make this private.
- // Destroys |upload_file_info|.
- void DeleteUpload(UploadFileInfo* upload_file_info);
-
private:
// Lookup UploadFileInfo* in pending_uploads_.
UploadFileInfo* GetUploadFileInfo(int upload_id) const;
@@ -80,9 +76,14 @@ class GDataUploader {
void MoveFileToCache(UploadFileInfo* upload_file_info);
// Handle failed uploads.
- void UploadFailed(UploadFileInfo* upload_file_info,
+ void UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info,
base::PlatformFileError error);
+ // Removes |upload_id| from UploadFileInfoMap |pending_uploads_|.
+ // Note that this does not delete the UploadFileInfo object itself,
+ // because it may still be in use by an asynchronous function.
+ void RemoveUpload(int upload_id);
+
// Pointers to GDataFileSystem and DocumentsServiceInterface objects owned by
// GDataSystemService. The lifetime of these two objects is guaranteed to
// exceed that of the GDataUploader instance.
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_upload_file_info.cc ('k') | chrome/browser/chromeos/gdata/gdata_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698