OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * Module for sending log entries to the server. | 7 * Module for sending log entries to the server. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 */ | 103 */ |
104 remoting.LogToServer.prototype.logSignalStrategyProgress = | 104 remoting.LogToServer.prototype.logSignalStrategyProgress = |
105 function(strategyType, progress) { | 105 function(strategyType, progress) { |
106 this.maybeExpireSessionId_(); | 106 this.maybeExpireSessionId_(); |
107 var entry = remoting.ServerLogEntry.makeSignalStrategyProgress( | 107 var entry = remoting.ServerLogEntry.makeSignalStrategyProgress( |
108 this.sessionId_, strategyType, progress); | 108 this.sessionId_, strategyType, progress); |
109 this.log_(entry); | 109 this.log_(entry); |
110 }; | 110 }; |
111 | 111 |
112 /** | 112 /** |
113 * @return {string} The current session id. This is random GUID, refreshed | |
114 * every 24hrs. | |
115 */ | |
116 remoting.LogToServer.prototype.getSessionId = function() { | |
117 return this.sessionId_; | |
118 }; | |
119 | |
120 | |
kelvinp
2015/05/14 21:54:58
Remove this blank line.
Jamie
2015/05/15 00:26:23
Done.
| |
121 /** | |
113 * Whether a session state is one of the states that occurs at the start of | 122 * Whether a session state is one of the states that occurs at the start of |
114 * a session. | 123 * a session. |
115 * | 124 * |
116 * @private | 125 * @private |
117 * @param {remoting.ClientSession.State} state | 126 * @param {remoting.ClientSession.State} state |
118 * @return {boolean} | 127 * @return {boolean} |
119 */ | 128 */ |
120 remoting.LogToServer.isStartOfSession_ = function(state) { | 129 remoting.LogToServer.isStartOfSession_ = function(state) { |
121 return ((state == remoting.ClientSession.State.CONNECTING) || | 130 return ((state == remoting.ClientSession.State.CONNECTING) || |
122 (state == remoting.ClientSession.State.INITIALIZING) || | 131 (state == remoting.ClientSession.State.INITIALIZING) || |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 this.authTotalTime_ = totalTime; | 288 this.authTotalTime_ = totalTime; |
280 }; | 289 }; |
281 | 290 |
282 /** | 291 /** |
283 * @param {string} hostVersion Version of the host for current session. | 292 * @param {string} hostVersion Version of the host for current session. |
284 * @return {void} Nothing. | 293 * @return {void} Nothing. |
285 */ | 294 */ |
286 remoting.LogToServer.prototype.setHostVersion = function(hostVersion) { | 295 remoting.LogToServer.prototype.setHostVersion = function(hostVersion) { |
287 this.hostVersion_ = hostVersion; | 296 this.hostVersion_ = hostVersion; |
288 }; | 297 }; |
289 | |
OLD | NEW |