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

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

Issue 10759007: gdata: Move GDataFileSystem::AddUploadedFile() call out of uploader and into GDataDownloadObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments for Patch #10. Created 8 years, 5 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.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_uploader.cc b/chrome/browser/chromeos/gdata/gdata_uploader.cc
index 68f0dde0c5739ec995b40f8286142c25c13b287d..1f43e0b0c8b0402e736f146e3339dd5a55c8937a 100644
--- a/chrome/browser/chromeos/gdata/gdata_uploader.cc
+++ b/chrome/browser/chromeos/gdata/gdata_uploader.cc
@@ -167,9 +167,6 @@ void GDataUploader::UpdateUpload(int upload_id,
upload_file_info->should_retry_file_open = false;
OpenFile(upload_file_info);
}
-
- if (download->IsComplete())
- MoveFileToCache(upload_file_info);
}
int64 GDataUploader::GetUploadedBytes(int upload_id) const {
@@ -486,26 +483,6 @@ void GDataUploader::OnResumeUploadResponseReceived(
UploadNextChunk(upload_file_info);
}
-void GDataUploader::MoveFileToCache(UploadFileInfo* upload_file_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (upload_file_info->entry == NULL)
- return;
-
- // Remove |upload_id| from the UploadFileInfoMap. The UploadFileInfo object
- // will be deleted upon completion of AddUploadedFile.
- RemoveUpload(upload_file_info->upload_id);
-
- DVLOG(1) << "MoveFileToCache " << upload_file_info->file_path.value();
- file_system_->AddUploadedFile(
- UPLOAD_NEW_FILE,
- upload_file_info->gdata_path.DirName(),
- upload_file_info->entry.get(),
- upload_file_info->file_path,
- GDataCache::FILE_OPERATION_MOVE,
- base::Bind(&base::DeletePointer<UploadFileInfo>,
- upload_file_info));
-}
-
void GDataUploader::UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info,
base::PlatformFileError error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

Powered by Google App Engine
This is Rietveld 408576698