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

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: remove stray comment 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..f4311c6a2d8b31df8734ebc8793de1b72b26da07 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,10 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
bool is_main_frame_plugin_document =
render_frame->IsMainFrame() &&
render_frame->GetWebFrame()->GetDocument().IsPluginDocument();
- PluginUMAReporter::ReportPDFLoadStatus(
+ ReportPDFLoadStatus(
is_main_frame_plugin_document
- ? PluginUMAReporter::LOADED_FULL_PAGE_PDF_WITH_PDFIUM
- : PluginUMAReporter::LOADED_EMBEDDED_PDF_WITH_PDFIUM);
+ ? PDFLoadStatus::LOADED_FULL_PAGE_PDF_WITH_PDFIUM
+ : PDFLoadStatus::LOADED_EMBEDDED_PDF_WITH_PDFIUM);
}
// Delay loading plugins if prerendering.
@@ -871,8 +872,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
url);
if (info.name == ASCIIToUTF16(ChromeContentClient::kPDFPluginName)) {
- PluginUMAReporter::ReportPDFLoadStatus(
- PluginUMAReporter::
+ ReportPDFLoadStatus(
+ PDFLoadStatus::
SHOWED_DISABLED_PLUGIN_PLACEHOLDER_FOR_EMBEDDED_PDF);
}

Powered by Google App Engine
This is Rietveld 408576698