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

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

Issue 8743023: Separate Authenticator and Session unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years 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
« no previous file with comments | « remoting/protocol/connection_tester.cc ('k') | remoting/protocol/fake_authenticator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/connection_tester.cc ('k') | remoting/protocol/fake_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698