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

Unified Diff: content/browser/download/download_manager.cc

Issue 8487002: Basic tests for DownloadUrl/DownloadUrlToFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed early setting of info->path to avoid assertion. Created 9 years, 1 month 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: content/browser/download/download_manager.cc
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
index e56a92791a4d8e498195d9e8569d3c447b3ac1da..3470dc13f16022deb73df5a41247f4fd40e32a33 100644
--- a/content/browser/download/download_manager.cc
+++ b/content/browser/download/download_manager.cc
@@ -174,7 +174,7 @@ void DownloadManager::GetTemporaryDownloads(
for (DownloadMap::iterator it = history_downloads_.begin();
it != history_downloads_.end(); ++it) {
if (it->second->is_temporary() &&
- it->second->full_path().DirName() == dir_path)
+ (dir_path.empty() || it->second->full_path().DirName() == dir_path))
result->push_back(it->second);
}
}
@@ -344,6 +344,7 @@ void DownloadManager::ContinueDownloadWithPath(DownloadItem* download,
DCHECK(ContainsKey(active_downloads_, download_id));
// Make sure the initial file name is set only once.
+ DCHECK(download->full_path().empty());
download->OnPathDetermined(chosen_file);
VLOG(20) << __FUNCTION__ << "()"

Powered by Google App Engine
This is Rietveld 408576698