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

Unified Diff: chrome/browser/download/download_file_manager.cc

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 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
« no previous file with comments | « no previous file | chrome/browser/download/download_history.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_file_manager.cc
diff --git a/chrome/browser/download/download_file_manager.cc b/chrome/browser/download/download_file_manager.cc
index 37640bab74729b45d7e533db69b258de4bc1d0fd..fd7d63091041fb128e2b8b6cd19166a5752663ef 100644
--- a/chrome/browser/download/download_file_manager.cc
+++ b/chrome/browser/download/download_file_manager.cc
@@ -35,8 +35,7 @@ const int kUpdatePeriodMs = 500;
} // namespace
DownloadFileManager::DownloadFileManager(ResourceDispatcherHost* rdh)
- : next_id_(0),
- resource_dispatcher_host_(rdh) {
+ : resource_dispatcher_host_(rdh) {
}
DownloadFileManager::~DownloadFileManager() {
@@ -234,13 +233,14 @@ void DownloadFileManager::CancelDownload(int id) {
void DownloadFileManager::CompleteDownload(int id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DVLOG(1) << __FUNCTION__ << " " << id;
if (!ContainsKey(downloads_, id))
return;
DownloadFile* download_file = downloads_[id];
- VLOG(20) << " " << __FUNCTION__ << "()"
+ DVLOG(1) << " " << __FUNCTION__ << "()"
<< " id = " << id
<< " download_file = " << download_file->DebugString();
@@ -289,10 +289,11 @@ void DownloadFileManager::RenameInProgressDownloadFile(
if (!download_file)
return;
- VLOG(20) << __FUNCTION__ << "()"
+ DVLOG(1) << __FUNCTION__ << "()"
<< " download_file = " << download_file->DebugString();
if (!download_file->Rename(full_path)) {
+ DVLOG(1) << __FUNCTION__ << " " << id;
// Error. Between the time the UI thread generated 'full_path' to the time
// this code runs, something happened that prevents us from renaming.
CancelDownloadOnRename(id);
@@ -308,12 +309,13 @@ void DownloadFileManager::RenameInProgressDownloadFile(
// 2. Unconfirmed.xxx.crdownload -> xxx (final, validated)
void DownloadFileManager::RenameCompletingDownloadFile(
int id, const FilePath& full_path, bool overwrite_existing_file) {
- VLOG(20) << __FUNCTION__ << "()" << " id = " << id
+ DVLOG(1) << __FUNCTION__ << "()" << " id = " << id
<< " overwrite_existing_file = " << overwrite_existing_file
<< " full_path = \"" << full_path.value() << "\"";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DownloadFile* download_file = GetDownloadFile(id);
+ DVLOG(1) << __FUNCTION__ << " " << download_file;
if (!download_file)
return;
« no previous file with comments | « no previous file | chrome/browser/download/download_history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698