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

Unified Diff: chrome/renderer/chrome_content_renderer_client.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/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 51e8e616838f365f3447c388de5b5f6caa004056..b36ceab6f6d73eb2973939b69617d9588f94960b 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -146,6 +146,7 @@
#endif
#if BUILDFLAG(ENABLE_PLUGINS)
+#include "chrome/common/pdf_uma.h"
#include "chrome/common/plugin_utils.h"
#include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
#include "chrome/renderer/plugins/power_saver_info.h"
@@ -824,10 +825,9 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
bool is_main_frame_plugin_document =
render_frame->IsMainFrame() &&
render_frame->GetWebFrame()->GetDocument().IsPluginDocument();
- PluginUMAReporter::ReportPDFLoadStatus(
- is_main_frame_plugin_document
- ? PluginUMAReporter::LOADED_FULL_PAGE_PDF_WITH_PDFIUM
- : PluginUMAReporter::LOADED_EMBEDDED_PDF_WITH_PDFIUM);
+ ReportPDFLoadStatus(is_main_frame_plugin_document
+ ? LOADED_FULL_PAGE_PDF_WITH_PDFIUM
+ : LOADED_EMBEDDED_PDF_WITH_PDFIUM);
}
// Delay loading plugins if prerendering.
@@ -871,9 +871,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
url);
if (info.name == ASCIIToUTF16(ChromeContentClient::kPDFPluginName)) {
- PluginUMAReporter::ReportPDFLoadStatus(
- PluginUMAReporter::
- SHOWED_DISABLED_PLUGIN_PLACEHOLDER_FOR_EMBEDDED_PDF);
+ ReportPDFLoadStatus(
+ SHOWED_DISABLED_PLUGIN_PLACEHOLDER_FOR_EMBEDDED_PDF);
}
placeholder = create_blocked_plugin(

Powered by Google App Engine
This is Rietveld 408576698