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

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

Issue 663023007: Include high-fidelity metadata about a download in incident reports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: added DCHECK Created 6 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.h » ('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 02dfa642a06abbff709e9c7deebdade13f726739..58ffea8783680ede9074a1796ba6ad6254a306d4 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -185,6 +185,14 @@ ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
download_manager_ = dm;
+
+#if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
+ SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service();
+ if (sb_service && !profile_->IsOffTheRecord()) {
+ // Include this download manager in the set monitored by safe browsing.
+ sb_service->AddDownloadManager(dm);
+ }
+#endif
}
void ChromeDownloadManagerDelegate::Shutdown() {
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698