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

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

Issue 126123002: Show connection type in web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing Android implementation. Created 6 years, 11 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
« no previous file with comments | « remoting/protocol/connection_to_host.h ('k') | no next file » | 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) 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/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 "remoting/base/constants.h" 10 #include "remoting/base/constants.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 SetState(CLOSED, OK); 205 SetState(CLOSED, OK);
206 } else { 206 } else {
207 CloseOnError(session_->error()); 207 CloseOnError(session_->error());
208 } 208 }
209 break; 209 break;
210 } 210 }
211 } 211 }
212 212
213 void ConnectionToHost::OnSessionRouteChange(const std::string& channel_name, 213 void ConnectionToHost::OnSessionRouteChange(const std::string& channel_name,
214 const TransportRoute& route) { 214 const TransportRoute& route) {
215 VLOG(0) << "Using " << TransportRoute::GetTypeString(route.type) 215 event_callback_->OnRouteChanged(channel_name, route);
216 << " connection for " << channel_name << " channel";
217 } 216 }
218 217
219 void ConnectionToHost::OnSessionChannelReady(const std::string& channel_name, 218 void ConnectionToHost::OnSessionChannelReady(const std::string& channel_name,
220 bool ready) { 219 bool ready) {
221 if (ready) { 220 if (ready) {
222 not_ready_channels_.erase(channel_name); 221 not_ready_channels_.erase(channel_name);
223 } else if (!ready) { 222 } else if (!ready) {
224 not_ready_channels_.insert(channel_name); 223 not_ready_channels_.insert(channel_name);
225 } 224 }
226 225
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 281
283 if (state != state_) { 282 if (state != state_) {
284 state_ = state; 283 state_ = state;
285 error_ = error; 284 error_ = error;
286 event_callback_->OnConnectionState(state_, error_); 285 event_callback_->OnConnectionState(state_, error_);
287 } 286 }
288 } 287 }
289 288
290 } // namespace protocol 289 } // namespace protocol
291 } // namespace remoting 290 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698