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

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

Issue 1397463003: Report the Auth method for me2me connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: 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 ac74e948708b8fafb0dede7b2edd3b0a97cb7ce9..ebb0bb49d822e0af978c7ddbde4122c019efbfb3 100644
--- a/remoting/webapp/base/js/client_session.js
+++ b/remoting/webapp/base/js/client_session.js
@@ -550,6 +550,7 @@ remoting.ClientSession.prototype.setState_ = function(newState) {
this.connectedDisposables_ = null;
}
+ this.logAuthMethod_();
this.notifyStateChanges_(oldState, this.state_);
// Record state count in an UMA enumerated histogram.
recordState(this.state_);
@@ -557,6 +558,19 @@ remoting.ClientSession.prototype.setState_ = function(newState) {
this.state_, this.error_, this.xmppErrorCache_.getFirstError());
};
+/** @private */
+remoting.ClientSession.prototype.logAuthMethod_ = function() {
+ // The AuthMethod is undefined before the AUTHENTICATED stage for a
+ // successful connection or the FAILED stage for a failed connection.
+ if (this.state_ == remoting.ClientSession.State.AUTHENTICATED ||
+ this.state_ == remoting.ClientSession.State.FAILED) {
Jamie 2015/10/09 01:17:21 Rather than relying on this, couldn't you have get
kelvinp 2015/10/09 18:00:34 The scenario that I am trying to cover is the foll
+ var authMethod = this.credentialsProvider_.getAuthMethod();
+ if (authMethod != null) {
+ this.logger_.setAuthMethod(authMethod);
+ }
+ }
+};
+
/**
* Records a Chromoting Connection State, stored in an UMA enumerated histogram.
* @param {remoting.ClientSession.State} state State identifier.

Powered by Google App Engine
This is Rietveld 408576698