Index: remoting/webapp/base/js/client_session.js |
diff --git a/remoting/webapp/base/js/client_session.js b/remoting/webapp/base/js/client_session.js |
index 329decea3d212eefa74c3b3093d4bd65f85df4c4..4391c2ea1b3deb31bb165fa2f8fb3cf097e686d7 100644 |
--- a/remoting/webapp/base/js/client_session.js |
+++ b/remoting/webapp/base/js/client_session.js |
@@ -581,6 +581,8 @@ remoting.ClientSession.prototype.notifyStateChanges_ = |
var error; |
switch (this.state_) { |
case remoting.ClientSession.State.CONNECTED: |
+ chrome.metricsPrivate.recordUserAction( |
+ 'Chromoting.Connections.Connected'); |
Sergey Ulanov
2015/08/20 21:05:19
Do we need to register the actions somewhere? I th
anandc
2015/08/20 23:12:01
Thanks, added.
I still don't see the actions metri
|
console.log('Connection established.'); |
var connectionInfo = new remoting.ConnectionInfo( |
this.host_, this.credentialsProvider_, this, this.plugin_); |
@@ -588,12 +590,16 @@ remoting.ClientSession.prototype.notifyStateChanges_ = |
break; |
case remoting.ClientSession.State.CONNECTING: |
+ chrome.metricsPrivate.recordUserAction( |
+ 'Chromoting.Connections.Connecting'); |
remoting.identity.getEmail().then(function(/** string */ email) { |
console.log('Connecting as ' + email); |
}); |
break; |
case remoting.ClientSession.State.AUTHENTICATED: |
+ chrome.metricsPrivate.recordUserAction( |
+ 'Chromoting.Connections.Authenticated'); |
console.log('Connection authenticated.'); |
break; |
@@ -602,6 +608,7 @@ remoting.ClientSession.prototype.notifyStateChanges_ = |
break; |
case remoting.ClientSession.State.CLOSED: |
+ chrome.metricsPrivate.recordUserAction('Chromoting.Connections.Closed'); |
console.log('Connection closed.'); |
this.listener_.onDisconnected(remoting.Error.none()); |
break; |
@@ -610,6 +617,7 @@ remoting.ClientSession.prototype.notifyStateChanges_ = |
case remoting.ClientSession.State.FAILED: |
error = this.getError(); |
if (!error.isNone()) { |
+ chrome.metricsPrivate.recordUserAction('Chromoting.Connections.Failed'); |
console.error('Connection failed: ' + error.toString()); |
} |
this.listener_.onConnectionFailed(error); |
@@ -619,6 +627,7 @@ remoting.ClientSession.prototype.notifyStateChanges_ = |
error = this.getError(); |
console.error('Connection dropped: ' + error.toString()); |
this.listener_.onDisconnected(error); |
+ chrome.metricsPrivate.recordUserAction('Chromoting.Connections.Dropped'); |
break; |
default: |