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

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: fix 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
« no previous file with comments | « chrome/common/pdf_uma.cc ('k') | chrome/renderer/plugins/plugin_uma.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8cd60bae3e0e05095d8ca7bacdd20358577f0ae7 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::kLoadedFullPagePdfWithPdfium
+ : PDFLoadStatus::kLoadedEmbeddedPdfWithPdfium);
}
// Delay loading plugins if prerendering.
@@ -871,9 +872,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(
+ PDFLoadStatus::kShowedDisabledPluginPlaceholderForEmbeddedPdf);
}
placeholder = create_blocked_plugin(
« no previous file with comments | « chrome/common/pdf_uma.cc ('k') | chrome/renderer/plugins/plugin_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698