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

Side by Side Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to try to get past main waterfall failure. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698