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

Unified Diff: remoting/webapp/base/js/client_session.js

Issue 1305453002: Add UMA stats for Chromoting connection details. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« remoting/client/plugin/chromoting_instance.cc ('K') | « remoting/compile_js.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« remoting/client/plugin/chromoting_instance.cc ('K') | « remoting/compile_js.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698