| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 (function() { | 10 (function() { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 onDone: this.onHttpRequestDone_.bind(this) | 91 onDone: this.onHttpRequestDone_.bind(this) |
| 92 }); | 92 }); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 remoting.DnsBlackholeChecker.prototype.getState = function() { | 95 remoting.DnsBlackholeChecker.prototype.getState = function() { |
| 96 return this.state_; | 96 return this.state_; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 remoting.DnsBlackholeChecker.prototype.getError = function() { | 99 remoting.DnsBlackholeChecker.prototype.getError = function() { |
| 100 if (this.blackholeState_ == BlackholeState.BLOCKED) { | 100 if (this.blackholeState_ == BlackholeState.BLOCKED) { |
| 101 return remoting.Error.NOT_AUTHORIZED; | 101 return new remoting.Error(remoting.Error.Tag.NOT_AUTHORIZED); |
| 102 } | 102 } |
| 103 | 103 |
| 104 return this.signalStrategy_.getError(); | 104 return this.signalStrategy_.getError(); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 remoting.DnsBlackholeChecker.prototype.getJid = function() { | 107 remoting.DnsBlackholeChecker.prototype.getJid = function() { |
| 108 base.debug.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED); | 108 base.debug.assert(this.state_ == remoting.SignalStrategy.State.CONNECTED); |
| 109 return this.signalStrategy_.getJid(); | 109 return this.signalStrategy_.getJid(); |
| 110 }; | 110 }; |
| 111 | 111 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 * @private | 180 * @private |
| 181 */ | 181 */ |
| 182 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) { | 182 remoting.DnsBlackholeChecker.prototype.setState_ = function(newState) { |
| 183 if (this.state_ != newState) { | 183 if (this.state_ != newState) { |
| 184 this.state_ = newState; | 184 this.state_ = newState; |
| 185 this.onStateChangedCallback_(this.state_); | 185 this.onStateChangedCallback_(this.state_); |
| 186 } | 186 } |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 }()); | 189 }()); |
| OLD | NEW |