| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "remoting/protocol/connection_to_host.h" | 5 #include "remoting/protocol/connection_to_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 CloseOnError(HOST_IS_OFFLINE); | 192 CloseOnError(HOST_IS_OFFLINE); |
| 193 break; | 193 break; |
| 194 case Session::SESSION_REJECTED: | 194 case Session::SESSION_REJECTED: |
| 195 case Session::AUTHENTICATION_FAILED: | 195 case Session::AUTHENTICATION_FAILED: |
| 196 CloseOnError(SESSION_REJECTED); | 196 CloseOnError(SESSION_REJECTED); |
| 197 break; | 197 break; |
| 198 case Session::INCOMPATIBLE_PROTOCOL: | 198 case Session::INCOMPATIBLE_PROTOCOL: |
| 199 CloseOnError(INCOMPATIBLE_PROTOCOL); | 199 CloseOnError(INCOMPATIBLE_PROTOCOL); |
| 200 break; | 200 break; |
| 201 case Session::CHANNEL_CONNECTION_ERROR: | 201 case Session::CHANNEL_CONNECTION_ERROR: |
| 202 case Session::UNKNOWN_ERROR: |
| 202 CloseOnError(NETWORK_FAILURE); | 203 CloseOnError(NETWORK_FAILURE); |
| 203 break; | 204 break; |
| 204 case Session::OK: | 205 case Session::OK: |
| 205 DLOG(FATAL) << "Error code isn't set"; | 206 DLOG(FATAL) << "Error code isn't set"; |
| 206 CloseOnError(NETWORK_FAILURE); | 207 CloseOnError(NETWORK_FAILURE); |
| 207 } | 208 } |
| 208 break; | 209 break; |
| 209 } | 210 } |
| 210 } | 211 } |
| 211 | 212 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 247 |
| 247 if (state != state_) { | 248 if (state != state_) { |
| 248 state_ = state; | 249 state_ = state; |
| 249 error_ = error; | 250 error_ = error; |
| 250 event_callback_->OnConnectionState(state_, error_); | 251 event_callback_->OnConnectionState(state_, error_); |
| 251 } | 252 } |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace protocol | 255 } // namespace protocol |
| 255 } // namespace remoting | 256 } // namespace remoting |
| OLD | NEW |