Chromium Code Reviews| 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 * A class of server log entries. | 7 * A class of server log entries. |
| 8 * | 8 * |
| 9 * Any changes to the values here need to be coordinated with the host and | 9 * Any changes to the values here need to be coordinated with the host and |
| 10 * server/log proto code. | 10 * server/log proto code. |
| 11 * See remoting/signaling/server_log_entry.{cc|h} | 11 * See remoting/signaling/server_log_entry.{cc|h} |
| 12 */ | 12 */ |
| 13 | 13 |
| 14 'use strict'; | 14 'use strict'; |
| 15 | 15 |
| 16 /** @suppress {duplicate} */ | 16 /** @suppress {duplicate} */ |
| 17 var remoting = remoting || {}; | 17 var remoting = remoting || {}; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * @private | 20 * @private |
| 21 * @constructor | 21 * @constructor |
| 22 */ | 22 */ |
| 23 remoting.ServerLogEntry = function() { | 23 remoting.ServerLogEntry = function() { |
| 24 /** @type Object<string> */ this.dict = {}; | 24 /** @type Object<string> */ this.dict = {}; |
| 25 }; | 25 }; |
| 26 | |
| 27 /** @private */ | 26 /** @private */ |
| 28 remoting.ServerLogEntry.KEY_EVENT_NAME_ = 'event-name'; | 27 remoting.ServerLogEntry.KEY_EVENT_NAME_ = 'event-name'; |
| 29 /** @private */ | 28 /** @private */ |
| 30 remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_ = 'session-state'; | 29 remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_ = 'session-state'; |
| 31 /** @private */ | 30 /** @private */ |
| 32 remoting.ServerLogEntry.VALUE_EVENT_NAME_SIGNAL_STRATEGY_PROGRESS_ = | 31 remoting.ServerLogEntry.VALUE_EVENT_NAME_SIGNAL_STRATEGY_PROGRESS_ = |
| 33 'signal-strategy-progress'; | 32 'signal-strategy-progress'; |
| 34 /** @private */ | 33 /** @private */ |
| 35 remoting.ServerLogEntry.KEY_SESSION_ID_ = 'session-id'; | 34 remoting.ServerLogEntry.KEY_SESSION_ID_ = 'session-id'; |
| 36 /** @private */ | 35 /** @private */ |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 remoting.ServerLogEntry.KEY_MODE_ = 'mode'; | 170 remoting.ServerLogEntry.KEY_MODE_ = 'mode'; |
| 172 // These values are passed in by the Activity to identify the current mode. | 171 // These values are passed in by the Activity to identify the current mode. |
| 173 remoting.ServerLogEntry.VALUE_MODE_IT2ME = 'it2me'; | 172 remoting.ServerLogEntry.VALUE_MODE_IT2ME = 'it2me'; |
| 174 remoting.ServerLogEntry.VALUE_MODE_ME2ME = 'me2me'; | 173 remoting.ServerLogEntry.VALUE_MODE_ME2ME = 'me2me'; |
| 175 remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING = 'lgapp'; | 174 remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING = 'lgapp'; |
| 176 remoting.ServerLogEntry.VALUE_MODE_UNKNOWN = 'unknown'; | 175 remoting.ServerLogEntry.VALUE_MODE_UNKNOWN = 'unknown'; |
| 177 | 176 |
| 178 /** @private */ | 177 /** @private */ |
| 179 remoting.ServerLogEntry.KEY_APP_ID_ = 'application-id'; | 178 remoting.ServerLogEntry.KEY_APP_ID_ = 'application-id'; |
| 180 | 179 |
| 180 | |
|
Lambros
2016/09/28 01:30:39
Only whitespace changes in this file.
Jamie
2016/09/28 21:14:36
Done.
| |
| 181 /** | 181 /** |
| 182 * Sets one field in this log entry. | 182 * Sets one field in this log entry. |
| 183 * | 183 * |
| 184 * @private | 184 * @private |
| 185 * @param {string} key | 185 * @param {string} key |
| 186 * @param {string} value | 186 * @param {string} value |
| 187 */ | 187 */ |
| 188 remoting.ServerLogEntry.prototype.set_ = function(key, value) { | 188 remoting.ServerLogEntry.prototype.set_ = function(key, value) { |
| 189 this.dict[key] = value; | 189 this.dict[key] = value; |
| 190 }; | 190 }; |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 * @param {?remoting.ChromotingEvent.XmppError} xmppError | 467 * @param {?remoting.ChromotingEvent.XmppError} xmppError |
| 468 * @return {void} Nothing. | 468 * @return {void} Nothing. |
| 469 */ | 469 */ |
| 470 remoting.ServerLogEntry.prototype.addXmppError = function(xmppError) { | 470 remoting.ServerLogEntry.prototype.addXmppError = function(xmppError) { |
| 471 if (!Boolean(xmppError)) { | 471 if (!Boolean(xmppError)) { |
| 472 return; | 472 return; |
| 473 } | 473 } |
| 474 this.set_(remoting.ServerLogEntry.KEY_XMPP_ERROR_RAW_STANZA, | 474 this.set_(remoting.ServerLogEntry.KEY_XMPP_ERROR_RAW_STANZA, |
| 475 xmppError.raw_stanza); | 475 xmppError.raw_stanza); |
| 476 }; | 476 }; |
| OLD | NEW |