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: |
| 161 error = HOST_IS_DISABLED; |
| 162 break; |
| 163 |
160 case DECLINE: | 164 case DECLINE: |
161 error = SESSION_REJECTED; | 165 error = SESSION_REJECTED; |
162 break; | 166 break; |
163 | 167 |
164 default: | 168 default: |
165 NOTREACHED(); | 169 NOTREACHED(); |
166 error = SESSION_REJECTED; | 170 error = SESSION_REJECTED; |
167 } | 171 } |
168 | 172 |
169 session->CloseInternal(error); | 173 session->CloseInternal(error); |
(...skipping 20 matching lines...) Expand all Loading... |
190 signal_strategy_->SendStanza( | 194 signal_strategy_->SendStanza( |
191 JingleMessageReply(error).ToXml(original_stanza)); | 195 JingleMessageReply(error).ToXml(original_stanza)); |
192 } | 196 } |
193 | 197 |
194 void JingleSessionManager::SessionDestroyed(JingleSession* session) { | 198 void JingleSessionManager::SessionDestroyed(JingleSession* session) { |
195 sessions_.erase(session->session_id_); | 199 sessions_.erase(session->session_id_); |
196 } | 200 } |
197 | 201 |
198 } // namespace protocol | 202 } // namespace protocol |
199 } // namespace remoting | 203 } // namespace remoting |
OLD | NEW |