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

Side by Side Diff: jingle/glue/proxy_resolving_client_socket.cc

Issue 473513002: Keep track of network error in ProxyRetryInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor formatting Created 6 years, 4 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 | « google_apis/gcm/engine/connection_factory_impl.cc ('k') | net/base/network_delegate.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) 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 "jingle/glue/proxy_resolving_client_socket.h" 5 #include "jingle/glue/proxy_resolving_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone, 302 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
303 weak_factory_.GetWeakPtr(), rv)); 303 weak_factory_.GetWeakPtr(), rv));
304 // Since we potentially have another try to go (trying the direct connect) 304 // Since we potentially have another try to go (trying the direct connect)
305 // set the return code code to ERR_IO_PENDING. 305 // set the return code code to ERR_IO_PENDING.
306 rv = net::ERR_IO_PENDING; 306 rv = net::ERR_IO_PENDING;
307 } 307 }
308 return rv; 308 return rv;
309 } 309 }
310 310
311 void ProxyResolvingClientSocket::ReportSuccessfulProxyConnection() { 311 void ProxyResolvingClientSocket::ReportSuccessfulProxyConnection() {
312 network_session_->proxy_service()->ReportSuccess(proxy_info_); 312 network_session_->proxy_service()->ReportSuccess(proxy_info_, NULL);
313 } 313 }
314 314
315 void ProxyResolvingClientSocket::Disconnect() { 315 void ProxyResolvingClientSocket::Disconnect() {
316 CloseTransportSocket(); 316 CloseTransportSocket();
317 if (pac_request_) { 317 if (pac_request_) {
318 network_session_->proxy_service()->CancelPacRequest(pac_request_); 318 network_session_->proxy_service()->CancelPacRequest(pac_request_);
319 pac_request_ = NULL; 319 pac_request_ = NULL;
320 } 320 }
321 user_connect_callback_.Reset(); 321 user_connect_callback_.Reset();
322 } 322 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return false; 399 return false;
400 } 400 }
401 401
402 void ProxyResolvingClientSocket::CloseTransportSocket() { 402 void ProxyResolvingClientSocket::CloseTransportSocket() {
403 if (transport_.get() && transport_->socket()) 403 if (transport_.get() && transport_->socket())
404 transport_->socket()->Disconnect(); 404 transport_->socket()->Disconnect();
405 transport_.reset(); 405 transport_.reset();
406 } 406 }
407 407
408 } // namespace jingle_glue 408 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/connection_factory_impl.cc ('k') | net/base/network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698