Chromium Code Reviews| 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 |