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

Side by Side Diff: blimp/client/session/blimp_client_session.cc

Issue 2023623002: Fix error logging for EndConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/session/blimp_client_session.h" 5 #include "blimp/client/session/blimp_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void ClientNetworkComponents::HandleConnection( 155 void ClientNetworkComponents::HandleConnection(
156 std::unique_ptr<BlimpConnection> connection) { 156 std::unique_ptr<BlimpConnection> connection) {
157 VLOG(1) << "Connection established."; 157 VLOG(1) << "Connection established.";
158 connection->AddConnectionErrorObserver(this); 158 connection->AddConnectionErrorObserver(this);
159 network_observer_->OnConnected(); 159 network_observer_->OnConnected();
160 connection_handler_->HandleConnection(std::move(connection)); 160 connection_handler_->HandleConnection(std::move(connection));
161 } 161 }
162 162
163 void ClientNetworkComponents::OnConnectionError(int result) { 163 void ClientNetworkComponents::OnConnectionError(int result) {
164 VLOG(1) << "Connection error: " << net::ErrorToString(result); 164 if (result >= 0) {
165 VLOG(1) << "Disconnected with reason: " << result;
166 } else {
167 VLOG(1) << "Connection error: " << net::ErrorToString(result);
168 }
165 network_observer_->OnDisconnected(result); 169 network_observer_->OnDisconnected(result);
166 } 170 }
167 171
168 BlimpClientSession::BlimpClientSession(const GURL& assigner_endpoint) 172 BlimpClientSession::BlimpClientSession(const GURL& assigner_endpoint)
169 : io_thread_("BlimpIOThread"), 173 : io_thread_("BlimpIOThread"),
170 tab_control_feature_(new TabControlFeature), 174 tab_control_feature_(new TabControlFeature),
171 navigation_feature_(new NavigationFeature), 175 navigation_feature_(new NavigationFeature),
172 ime_feature_(new ImeFeature), 176 ime_feature_(new ImeFeature),
173 render_widget_feature_(new RenderWidgetFeature), 177 render_widget_feature_(new RenderWidgetFeature),
174 settings_feature_(new SettingsFeature), 178 settings_feature_(new SettingsFeature),
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 return settings_feature_.get(); 290 return settings_feature_.get();
287 } 291 }
288 292
289 BlimpConnectionStatistics* BlimpClientSession::GetBlimpConnectionStatistics() 293 BlimpConnectionStatistics* BlimpClientSession::GetBlimpConnectionStatistics()
290 const { 294 const {
291 return blimp_connection_statistics_; 295 return blimp_connection_statistics_;
292 } 296 }
293 297
294 } // namespace client 298 } // namespace client
295 } // namespace blimp 299 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698