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

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

Issue 601573002: Add UMA stats for new Print Preview UI elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add INVITATION_AVAILABLE UMA stat. 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
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 cf3a08a1d6aae6f0f094ff4e22d14f008d7c2b8b..efb174570ba15f2686874ae385bc7d24dc364b87 100644
--- a/chrome/browser/resources/print_preview/search/destination_search.js
+++ b/chrome/browser/resources/print_preview/search/destination_search.js
@@ -459,6 +459,10 @@ cr.define('print_preview', function() {
var invitations = this.userInfo_.activeUser ?
this.invitationStore_.invitations(this.userInfo_.activeUser) : [];
if (invitations.length > 0) {
+ if (this.invitation_ != invitations[0]) {
+ this.metrics_.record(print_preview.Metrics.DestinationSearchBucket.
+ INVITATION_AVAILABLE);
+ }
this.invitation_ = invitations[0];
this.showInvitation_(this.invitation_);
} else {
@@ -661,6 +665,9 @@ cr.define('print_preview', function() {
* @private
*/
onInvitationProcessButtonClick_: function(accept) {
+ this.metrics_.record(accept ?
+ print_preview.Metrics.DestinationSearchBucket.INVITATION_ACCEPTED :
+ print_preview.Metrics.DestinationSearchBucket.INVITATION_REJECTED);
this.invitationStore_.processInvitation(this.invitation_, accept);
this.updateInvitations_();
},

Powered by Google App Engine
This is Rietveld 408576698