| 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 #include "remoting/protocol/jingle_session_manager.h" | 5 #include "remoting/protocol/jingle_session_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "remoting/jingle_glue/iq_sender.h" | 8 #include "remoting/jingle_glue/iq_sender.h" |
| 9 #include "remoting/jingle_glue/jingle_info_request.h" | 9 #include "remoting/jingle_glue/jingle_info_request.h" |
| 10 #include "remoting/jingle_glue/signal_strategy.h" | 10 #include "remoting/jingle_glue/signal_strategy.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 if (response == SessionManager::ACCEPT) { | 151 if (response == SessionManager::ACCEPT) { |
| 152 session->AcceptIncomingConnection(message); | 152 session->AcceptIncomingConnection(message); |
| 153 } else { | 153 } else { |
| 154 ErrorCode error; | 154 ErrorCode error; |
| 155 switch (response) { | 155 switch (response) { |
| 156 case INCOMPATIBLE: | 156 case INCOMPATIBLE: |
| 157 error = INCOMPATIBLE_PROTOCOL; | 157 error = INCOMPATIBLE_PROTOCOL; |
| 158 break; | 158 break; |
| 159 | 159 |
| 160 case DISABLED: | 160 case OVERLOAD: |
| 161 error = HOST_IS_DISABLED; | 161 error = HOST_OVERLOAD; |
| 162 break; | 162 break; |
| 163 | 163 |
| 164 case DECLINE: | 164 case DECLINE: |
| 165 error = SESSION_REJECTED; | 165 error = SESSION_REJECTED; |
| 166 break; | 166 break; |
| 167 | 167 |
| 168 default: | 168 default: |
| 169 NOTREACHED(); | 169 NOTREACHED(); |
| 170 error = SESSION_REJECTED; | 170 error = SESSION_REJECTED; |
| 171 } | 171 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 194 signal_strategy_->SendStanza( | 194 signal_strategy_->SendStanza( |
| 195 JingleMessageReply(error).ToXml(original_stanza)); | 195 JingleMessageReply(error).ToXml(original_stanza)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void JingleSessionManager::SessionDestroyed(JingleSession* session) { | 198 void JingleSessionManager::SessionDestroyed(JingleSession* session) { |
| 199 sessions_.erase(session->session_id_); | 199 sessions_.erase(session->session_id_); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace protocol | 202 } // namespace protocol |
| 203 } // namespace remoting | 203 } // namespace remoting |
| OLD | NEW |