diff options
author | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 05:00:23 +0000 |
---|---|---|
committer | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 05:00:23 +0000 |
commit | 43210afe1fa85d9a71d8b97c8f3f2181c6b299c6 (patch) | |
tree | 23468cd8abe61569b7417ecfd12ed735534158af /chrome/browser/chromeos/drive/download_handler.cc | |
parent | 2cb5e307456d1b7d44d392f4265be94cbbeee0dc (diff) | |
download | chromium_src-43210afe1fa85d9a71d8b97c8f3f2181c6b299c6.zip chromium_src-43210afe1fa85d9a71d8b97c8f3f2181c6b299c6.tar.gz chromium_src-43210afe1fa85d9a71d8b97c8f3f2181c6b299c6.tar.bz2 |
[Downloads] Switch callers of GetFullPath() to GetTargetFilePath()
While a download is in progress, the path returned by GetFullPath() is
the path to the intermediate file. This file can be renamed or disappear
completely on the FILE thread. The path may also be reset to empty when
the download is interrupted.
Callers who wish to access the target path of a download should use
DownloadItem::GetTargetFilePath() instead.
BUG=7648
Review URL: https://chromiumcodereview.appspot.com/14564011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/drive/download_handler.cc')
-rw-r--r-- | chrome/browser/chromeos/drive/download_handler.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/drive/download_handler.cc b/chrome/browser/chromeos/drive/download_handler.cc index a8f879b..f6a0756 100644 --- a/chrome/browser/chromeos/drive/download_handler.cc +++ b/chrome/browser/chromeos/drive/download_handler.cc @@ -88,7 +88,7 @@ bool IsPersistedDriveDownload(const base::FilePath& drive_tmp_download_path, DownloadItem* download) { // Persisted downloads are not in IN_PROGRESS state when created, while newly // created downloads are. - return drive_tmp_download_path.IsParent(download->GetFullPath()) && + return drive_tmp_download_path.IsParent(download->GetTargetFilePath()) && download->GetState() != DownloadItem::IN_PROGRESS; } |