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

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: 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
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 VLOG(0) << "Using " << TransportRoute::GetTypeString(route.type)
216 << " connection for " << channel_name << " channel"; 216 << " connection for " << channel_name << " channel";
217 event_callback_->OnRouteChanged(channel_name, route);
217 } 218 }
218 219
219 void ConnectionToHost::OnSessionChannelReady(const std::string& channel_name, 220 void ConnectionToHost::OnSessionChannelReady(const std::string& channel_name,
220 bool ready) { 221 bool ready) {
221 if (ready) { 222 if (ready) {
222 not_ready_channels_.erase(channel_name); 223 not_ready_channels_.erase(channel_name);
223 } else if (!ready) { 224 } else if (!ready) {
224 not_ready_channels_.insert(channel_name); 225 not_ready_channels_.insert(channel_name);
225 } 226 }
226 227
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 if (state != state_) { 284 if (state != state_) {
284 state_ = state; 285 state_ = state;
285 error_ = error; 286 error_ = error;
286 event_callback_->OnConnectionState(state_, error_); 287 event_callback_->OnConnectionState(state_, error_);
287 } 288 }
288 } 289 }
289 290
290 } // namespace protocol 291 } // namespace protocol
291 } // namespace remoting 292 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698