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

Unified Diff: components/dom_distiller/core/viewer.cc

Issue 607013003: add UMA for no. of pages with no distilled data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nit Created 6 years, 3 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/viewer.cc
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 6d569c46e6268301695f198b8aa1ce02fa34f589..b0365e075bd30dd63ffd4500c3ffe2c7f8d039e6 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -9,6 +9,7 @@
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
+#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "components/dom_distiller/core/distilled_page_prefs.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
@@ -92,6 +93,7 @@ const std::string GetFontCssClass(DistilledPagePrefs::FontFamily font_family) {
void EnsureNonEmptyTitleAndContent(std::string* title, std::string* content) {
if (title->empty())
*title = l10n_util::GetStringUTF8(IDS_DOM_DISTILLER_VIEWER_NO_DATA_TITLE);
+ UMA_HISTOGRAM_BOOLEAN("DomDistiller.PageHasDistilledData", !content->empty());
if (content->empty()) {
*content = l10n_util::GetStringUTF8(
IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698