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_(); |
}, |