OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_download_manager_delegate.h" | 5 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 download_history_->UpdateEntry(item); | 213 download_history_->UpdateEntry(item); |
214 } | 214 } |
215 | 215 |
216 void ChromeDownloadManagerDelegate::UpdatePathForItemInPersistentStore( | 216 void ChromeDownloadManagerDelegate::UpdatePathForItemInPersistentStore( |
217 DownloadItem* item, | 217 DownloadItem* item, |
218 const FilePath& new_path) { | 218 const FilePath& new_path) { |
219 download_history_->UpdateDownloadPath(item, new_path); | 219 download_history_->UpdateDownloadPath(item, new_path); |
220 } | 220 } |
221 | 221 |
222 void ChromeDownloadManagerDelegate::RemoveItemFromPersistentStore( | 222 void ChromeDownloadManagerDelegate::RemoveItemFromPersistentStore( |
223 DownloadItem* item) { | 223 int64 db_handle) { |
224 download_history_->RemoveEntry(item); | 224 download_history_->RemoveEntry(db_handle); |
225 } | 225 } |
226 | 226 |
227 void ChromeDownloadManagerDelegate::RemoveItemsFromPersistentStoreBetween( | 227 void ChromeDownloadManagerDelegate::RemoveItemsFromPersistentStoreBetween( |
228 const base::Time remove_begin, | 228 const base::Time remove_begin, |
229 const base::Time remove_end) { | 229 const base::Time remove_end) { |
230 download_history_->RemoveEntriesBetween(remove_begin, remove_end); | 230 download_history_->RemoveEntriesBetween(remove_begin, remove_end); |
231 } | 231 } |
232 | 232 |
233 void ChromeDownloadManagerDelegate::GetSaveDir(TabContents* tab_contents, | 233 void ChromeDownloadManagerDelegate::GetSaveDir(TabContents* tab_contents, |
234 FilePath* website_save_dir, | 234 FilePath* website_save_dir, |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 // TODO(noelutz): This function currently works as a callback place holder. | 537 // TODO(noelutz): This function currently works as a callback place holder. |
538 // Once we decide the hash check is reliable, we could move the | 538 // Once we decide the hash check is reliable, we could move the |
539 // MaybeCompleteDownload in OnAllDataSaved to this function. | 539 // MaybeCompleteDownload in OnAllDataSaved to this function. |
540 void ChromeDownloadManagerDelegate::CheckDownloadHashDone( | 540 void ChromeDownloadManagerDelegate::CheckDownloadHashDone( |
541 int32 download_id, | 541 int32 download_id, |
542 bool is_dangerous_hash) { | 542 bool is_dangerous_hash) { |
543 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 543 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
544 DVLOG(1) << "CheckDownloadHashDone, download_id: " << download_id | 544 DVLOG(1) << "CheckDownloadHashDone, download_id: " << download_id |
545 << " is dangerous_hash: " << is_dangerous_hash; | 545 << " is dangerous_hash: " << is_dangerous_hash; |
546 } | 546 } |
OLD | NEW |