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

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

Issue 8600006: Track download request time and always send back the hash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload Created 9 years, 1 month 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/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 2e4c160e88b94fa2d7a33c0cb49905d632d23c66..0d6ba7ccf8932c2baa5866927e0ad73a3ace40f5 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -207,8 +207,11 @@ bool ChromeDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) {
bool ChromeDownloadManagerDelegate::GenerateFileHash() {
#if defined(ENABLE_SAFE_BROWSING)
+ SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service();
return profile_->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled) &&
- g_browser_process->safe_browsing_service()->DownloadBinHashNeeded();
+ (sb_service->DownloadBinHashNeeded() ||
+ (sb_service->download_protection_service() &&
+ sb_service->download_protection_service()->enabled()));
Randy Smith (Not in Mondays) 2011/11/18 23:27:17 Why this change? Why can't sb_service->DownloadBi
noelutz 2011/11/18 23:30:24 Good point. Done.
#else
return false;
#endif
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698