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

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

Issue 2901563003: PDF: Add UMA to track embedded PDF triggered drive-by downloads. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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 37c55d6a14feb6b932b00063801f9f4caf33dbd0..e6fe6992e4e4d9231ec8a34d28268140e86e0693 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -78,6 +78,10 @@
#include "extensions/common/constants.h"
#endif
+#if BUILDFLAG(ENABLE_PLUGINS)
+#include "chrome/common/pdf_uma.h"
+#endif
+
using content::BrowserThread;
using content::DownloadItem;
using content::DownloadManager;
@@ -732,6 +736,12 @@ void ChromeDownloadManagerDelegate::GetFileMimeType(
FROM_HERE, {base::MayBlock()}, base::Bind(&GetMimeType, path), callback);
}
+void ChromeDownloadManagerDelegate::RecordDriveByPDFDownload() const {
+#if BUILDFLAG(ENABLE_PLUGINS)
+ ReportPDFLoadStatus(TRIGGERED_DRIVE_BY_DOWNLOAD);
+#endif
+}
+
#if defined(FULL_SAFE_BROWSING)
void ChromeDownloadManagerDelegate::CheckClientDownloadDone(
uint32_t download_id,

Powered by Google App Engine
This is Rietveld 408576698