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

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

Issue 10735059: gdata cleanup: Make GDataFileSystem::AddUploadedFile() take scoped_ptr<DocumentEntry>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_download_observer.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.cc b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
index 2edb81ac05ab916ac4d42588c135247d52ab210f..8e110eeb9f97a1f321588d6f89c3d5034e37a445 100644
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.cc
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
@@ -521,8 +521,8 @@ void GDataDownloadObserver::MoveFileToGDataCache(DownloadItem* download) {
// Take ownership of the DocumentEntry object. It will be released upon
achuithb 2012/07/11 18:56:22 Maybe update this statement to note that ownership
hshi1 2012/07/11 19:25:44 Done.
// completion of the AddUploadedFile() call below.
- DocumentEntry* entry = data->entry_passed().release();
- if (!entry) {
+ scoped_ptr<DocumentEntry> entry = data->entry_passed();
+ if (!entry.get()) {
NOTREACHED();
return;
}
@@ -531,11 +531,10 @@ void GDataDownloadObserver::MoveFileToGDataCache(DownloadItem* download) {
// use the final target path when the download item is in COMPLETE state.
file_system_->AddUploadedFile(UPLOAD_NEW_FILE,
data->virtual_dir_path(),
- entry,
+ entry.Pass(),
download->GetTargetFilePath(),
GDataCache::FILE_OPERATION_MOVE,
- base::Bind(&base::DeletePointer<DocumentEntry>,
- entry));
+ base::Bind(&base::DoNothing));
}
} // namespace gdata
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.h » ('j') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698