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

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

Issue 8487002: Basic tests for DownloadUrl/DownloadUrlToFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ifdef out breaking chromeos behavior with bug pointer. Created 9 years 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
« no previous file with comments | « content/browser/download/download_file_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 1168a2990762e13457c03ce18654a70521545887..6045f1dc236f1a0ffedef3370b1a4b9b681ec850 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -183,7 +183,7 @@ void DownloadManagerImpl::GetTemporaryDownloads(
for (DownloadMap::iterator it = history_downloads_.begin();
it != history_downloads_.end(); ++it) {
if (it->second->IsTemporary() &&
- it->second->GetFullPath().DirName() == dir_path)
+ (dir_path.empty() || it->second->GetFullPath().DirName() == dir_path))
result->push_back(it->second);
}
}
@@ -383,6 +383,7 @@ void DownloadManagerImpl::ContinueDownloadWithPath(
DCHECK(ContainsKey(active_downloads_, download_id));
// Make sure the initial file name is set only once.
+ DCHECK(download->GetFullPath().empty());
download->OnPathDetermined(chosen_file);
VLOG(20) << __FUNCTION__ << "()"
« no previous file with comments | « content/browser/download/download_file_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698