Commit 2a57b1a7 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Reuse ReportPDFLoadStatus() in ChromeMimeHandlerViewGuestDelegate.

Reuse ReportPDFLoadStatus() to report the PDF.LoadStatus UMA, instead of
doing it manually.

Change-Id: I92943fdf21b3a5bc800f2eab42cc1154e95bbd7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163747Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762453}
parent 89108951
......@@ -6,7 +6,6 @@
#include <utility>
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "chrome/common/pdf_util.h"
#include "components/renderer_context_menu/context_menu_delegate.h"
......@@ -37,11 +36,10 @@ void ChromeMimeHandlerViewGuestDelegate::RecordLoadMetric(
const std::string& mime_type) {
if (mime_type != kPDFMimeType)
return;
base::UmaHistogramEnumeration(
"PDF.LoadStatus",
in_main_frame ? PDFLoadStatus::kLoadedFullPagePdfWithPdfium
: PDFLoadStatus::kLoadedEmbeddedPdfWithPdfium,
PDFLoadStatus::kPdfLoadStatusCount);
ReportPDFLoadStatus(in_main_frame
? PDFLoadStatus::kLoadedFullPagePdfWithPdfium
: PDFLoadStatus::kLoadedEmbeddedPdfWithPdfium);
}
} // namespace extensions
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment