OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/download/download_file.h" | 5 #include "chrome/browser/download/download_file.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "chrome/browser/browser_thread.h" | 11 #include "chrome/browser/browser_thread.h" |
12 #include "chrome/browser/download/download_manager.h" | 12 #include "chrome/browser/download/download_manager.h" |
13 #include "chrome/browser/download/download_util.h" | 13 #include "chrome/browser/download/download_util.h" |
14 #include "chrome/browser/history/download_create_info.h" | 14 #include "chrome/browser/history/download_create_info.h" |
15 | 15 |
16 DownloadFile::DownloadFile(const DownloadCreateInfo* info, | 16 DownloadFile::DownloadFile(const DownloadCreateInfo* info, |
17 DownloadManager* download_manager) | 17 DownloadManager* download_manager) |
18 : BaseFile(info->save_info.file_path, | 18 : BaseFile(info->save_info.file_path, |
19 info->url, | 19 info->url, |
20 info->referrer_url, | 20 info->referrer_url, |
21 info->received_bytes, | 21 info->received_bytes, |
22 info->save_info.file_stream), | 22 info->save_info.file_stream), |
23 id_(info->download_id), | 23 id_(info->download_id), |
24 child_id_(info->child_id), | 24 child_id_(info->child_id), |
25 request_id_(info->request_id), | 25 request_id_(info->request_id), |
26 download_manager_(download_manager) { | 26 download_manager_(download_manager) { |
27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
28 | |
Scott Hess - ex-Googler
2011/01/13 22:58:08
Egregious whitespace change. I agree with the cha
| |
29 } | 28 } |
30 | 29 |
31 DownloadFile::~DownloadFile() { | 30 DownloadFile::~DownloadFile() { |
32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 31 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
33 } | 32 } |
34 | 33 |
35 void DownloadFile::DeleteCrDownload() { | 34 void DownloadFile::DeleteCrDownload() { |
36 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
37 FilePath crdownload = download_util::GetCrDownloadPath(full_path_); | 36 FilePath crdownload = download_util::GetCrDownloadPath(full_path_); |
38 file_util::Delete(crdownload, false); | 37 file_util::Delete(crdownload, false); |
(...skipping 21 matching lines...) Expand all Loading... | |
60 " child_id_ = " "%d" | 59 " child_id_ = " "%d" |
61 " request_id_ = " "%d" | 60 " request_id_ = " "%d" |
62 " Base File = %s" | 61 " Base File = %s" |
63 " }", | 62 " }", |
64 full_path_.value().c_str(), | 63 full_path_.value().c_str(), |
65 id_, | 64 id_, |
66 child_id_, | 65 child_id_, |
67 request_id_, | 66 request_id_, |
68 BaseFile::DebugString().c_str()); | 67 BaseFile::DebugString().c_str()); |
69 } | 68 } |
OLD | NEW |