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) { |
+ 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. |