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

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

Issue 10480002: Implements metrics for destination search. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 1fa15a34d8f5c68d528a17064c1f392cfe32090b..3635062ed6696a39eaef73a78ba08b9896055aaf 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -34,6 +34,13 @@ cr.define('print_preview', function() {
this.userInfo_ = new print_preview.UserInfo();
/**
+ * Metrics object used to report usage statistics.
+ * @type {!print_preview.Metrics}
+ * @private
+ */
+ this.metrics_ = new print_preview.Metrics();
+
+ /**
* Data store which holds print destinations.
* @type {!print_preview.DestinationStore}
* @private
@@ -64,7 +71,7 @@ cr.define('print_preview', function() {
* @private
*/
this.destinationSearch_ = new print_preview.DestinationSearch(
- this.destinationStore_, this.userInfo_);
+ this.destinationStore_, this.userInfo_, this.metrics_);
this.addChild(this.destinationSearch_);
/**
@@ -611,6 +618,8 @@ cr.define('print_preview', function() {
!e.metaKey) {
if (this.destinationSearch_.getIsVisible()) {
this.destinationSearch_.setIsVisible(false);
+ this.metrics_.increment(
+ print_preview.Metrics.Bucket.DESTINATION_SELECTION_CANCELED);
} else {
this.close_();
}
@@ -650,6 +659,8 @@ cr.define('print_preview', function() {
onDestinationChangeButtonActivate_: function() {
this.destinationSearch_.setIsVisible(true);
this.destinationStore_.startLoadAllCloudDestinations();
+ this.metrics_.increment(
+ print_preview.Metrics.Bucket.DESTINATION_SEARCH_SHOWN);
},
/**
@@ -731,6 +742,7 @@ cr.define('print_preview', function() {
<include src="cloud_print_interface.js"/>
<include src="print_preview_utils.js"/>
<include src="print_header.js"/>
+<include src="metrics.js"/>
<include src="settings/page_settings.js"/>
<include src="settings/copies_settings.js"/>
« no previous file with comments | « chrome/browser/resources/print_preview/metrics.js ('k') | chrome/browser/resources/print_preview/print_preview_utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698