OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** | 10 /** |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 if (this.fakeSslHandshakeResponse_[i] != | 279 if (this.fakeSslHandshakeResponse_[i] != |
280 remoting.XmppConnection.FAKE_SSL_RESPONSE_[i]) { | 280 remoting.XmppConnection.FAKE_SSL_RESPONSE_[i]) { |
281 responseMatches = false; | 281 responseMatches = false; |
282 break; | 282 break; |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 if (!responseMatches) { | 286 if (!responseMatches) { |
287 var formatted = ""; | 287 var formatted = ""; |
288 for (var i = 0; i < this.fakeSslHandshakeResponse_.length; ++i) { | 288 for (var i = 0; i < this.fakeSslHandshakeResponse_.length; ++i) { |
289 var x = /** @type {number} */ this.fakeSslHandshakeResponse_[i]; | 289 var x = /** @type {number} */ (this.fakeSslHandshakeResponse_[i]); |
290 formatted += " 0x" + x.toString(16); | 290 formatted += " 0x" + x.toString(16); |
291 }; | 291 }; |
292 console.error( | 292 console.error( |
293 "XmppConnection: Fake SSL response didn't match what was " + | 293 "XmppConnection: Fake SSL response didn't match what was " + |
294 "expected. Trying to continue anyway. Received response: [" + | 294 "expected. Trying to continue anyway. Received response: [" + |
295 formatted + "]"); | 295 formatted + "]"); |
296 } | 296 } |
297 } | 297 } |
298 } | 298 } |
299 | 299 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 /** | 460 /** |
461 * @param {remoting.SignalStrategy.State} newState | 461 * @param {remoting.SignalStrategy.State} newState |
462 * @private | 462 * @private |
463 */ | 463 */ |
464 remoting.XmppConnection.prototype.setState_ = function(newState) { | 464 remoting.XmppConnection.prototype.setState_ = function(newState) { |
465 if (this.state_ != newState) { | 465 if (this.state_ != newState) { |
466 this.state_ = newState; | 466 this.state_ = newState; |
467 this.onStateChangedCallback_(this.state_); | 467 this.onStateChangedCallback_(this.state_); |
468 } | 468 } |
469 }; | 469 }; |
OLD | NEW |