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

Unified Diff: chrome/browser/resources/print_preview/search/destination_search.js

Issue 189623004: UMA Histograms for Register Promos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/browser/resources/print_preview/search/destination_search.js
diff --git a/chrome/browser/resources/print_preview/search/destination_search.js b/chrome/browser/resources/print_preview/search/destination_search.js
index a0a2857d7683d3a88c09041f53377909a40d3d58..7ec38032d9a9a2af2c14242f455759c2737f1077 100644
--- a/chrome/browser/resources/print_preview/search/destination_search.js
+++ b/chrome/browser/resources/print_preview/search/destination_search.js
@@ -43,6 +43,14 @@ cr.define('print_preview', function() {
this.metrics_ = metrics;
/**
+ * Whether or not a UMA histogram for the register promo being shown was
+ * already recorded.
+ * @type {bool}
+ * @private
+ */
+ this.registerPromoShownMetricRecorded_ = false;
+
+ /**
* Search box used to search through the destination lists.
* @type {!print_preview.SearchBox}
* @private
@@ -322,6 +330,13 @@ cr.define('print_preview', function() {
}
});
+ if (unregisteredCloudDestinations.length != 0 &&
+ !this.registerPromoShownMetricRecorded_) {
+ this.metrics_.incrementDestinationSearchBucket(
+ print_preview.Metrics.DestinationSearchBucket.REGISTER_PROMO_SHOWN);
+ this.registerPromoShownMetricRecorded_ = true;
+ }
+
var finalCloudDestinations = unregisteredCloudDestinations.slice(
0, DestinationSearch.MAX_PROMOTED_UNREGISTERED_PRINTERS_).concat(
cloudDestinations,

Powered by Google App Engine
This is Rietveld 408576698