summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorkuan <kuan@chromium.org>2014-09-26 20:29:46 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-27 03:29:57 +0000
commit69231d048672856333da7d15ef6ce9afa59e3d0d (patch)
treef39cb9abe9b8d60a4d9017670cb0bf2911a6735c /components
parent2133f1b241ddd95edaf8d7eeedd3d0bc137ee912 (diff)
downloadchromium_src-69231d048672856333da7d15ef6ce9afa59e3d0d.zip
chromium_src-69231d048672856333da7d15ef6ce9afa59e3d0d.tar.gz
chromium_src-69231d048672856333da7d15ef6ce9afa59e3d0d.tar.bz2
add UMA to record if a page has distilled data.
BUG=418190 Review URL: https://codereview.chromium.org/607013003 Cr-Commit-Position: refs/heads/master@{#297100}
Diffstat (limited to 'components')
-rw-r--r--components/dom_distiller/core/viewer.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 6d569c4..b0365e0 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);