| Index: chrome/browser/download/download_file_manager.cc
|
| ===================================================================
|
| --- chrome/browser/download/download_file_manager.cc (revision 70630)
|
| +++ chrome/browser/download/download_file_manager.cc (working copy)
|
| @@ -18,6 +18,7 @@
|
| #include "chrome/browser/platform_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
|
| +#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| #include "chrome/browser/tab_contents/tab_contents.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -74,13 +75,14 @@
|
| STLDeleteValues(&downloads_);
|
| }
|
|
|
| -void DownloadFileManager::CreateDownloadFile(
|
| - DownloadCreateInfo* info, DownloadManager* download_manager) {
|
| +void DownloadFileManager::CreateDownloadFile(DownloadCreateInfo* info,
|
| + DownloadManager* download_manager,
|
| + bool get_hash) {
|
| VLOG(20) << __FUNCTION__ << "()" << " info = " << info->DebugString();
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
|
|
|
| scoped_ptr<DownloadFile> download_file(
|
| - new DownloadFile(info, download_manager));
|
| + new DownloadFile(info, download_manager, get_hash));
|
| if (!download_file->Initialize()) {
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
| @@ -177,9 +179,12 @@
|
|
|
| manager->CreateDownloadItem(info);
|
|
|
| + bool hash_needed = resource_dispatcher_host_->safe_browsing_service()->
|
| + DownloadBinHashNeeded();
|
| +
|
| BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
|
| NewRunnableMethod(this, &DownloadFileManager::CreateDownloadFile,
|
| - info, make_scoped_refptr(manager)));
|
| + info, make_scoped_refptr(manager), hash_needed));
|
| }
|
|
|
| // We don't forward an update to the UI thread here, since we want to throttle
|
|
|