Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: remoting/protocol/jingle_session_manager.cc

Issue 9836062: Implement exponential backoff for failed Me2Me authentication attempts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698