| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "google_apis/gcm/engine/connection_factory_impl.h" | 5 #include "google_apis/gcm/engine/connection_factory_impl.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
| 10 #include "google_apis/gcm/engine/connection_handler_impl.h" | 10 #include "google_apis/gcm/engine/connection_handler_impl.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 } | 450 } |
| 451 | 451 |
| 452 net::SSLConfig ssl_config; | 452 net::SSLConfig ssl_config; |
| 453 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); | 453 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); |
| 454 if (proxy_info_.is_https() && ssl_config.send_client_cert) { | 454 if (proxy_info_.is_https() && ssl_config.send_client_cert) { |
| 455 network_session_->ssl_client_auth_cache()->Remove( | 455 network_session_->ssl_client_auth_cache()->Remove( |
| 456 proxy_info_.proxy_server().host_port_pair()); | 456 proxy_info_.proxy_server().host_port_pair()); |
| 457 } | 457 } |
| 458 | 458 |
| 459 int status = network_session_->proxy_service()->ReconsiderProxyAfterError( | 459 int status = network_session_->proxy_service()->ReconsiderProxyAfterError( |
| 460 GetCurrentEndpoint(), &proxy_info_, | 460 GetCurrentEndpoint(), error, &proxy_info_, |
| 461 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone, | 461 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone, |
| 462 weak_ptr_factory_.GetWeakPtr()), | 462 weak_ptr_factory_.GetWeakPtr()), |
| 463 &pac_request_, | 463 &pac_request_, |
| 464 bound_net_log_); | 464 bound_net_log_); |
| 465 if (status == net::OK || status == net::ERR_IO_PENDING) { | 465 if (status == net::OK || status == net::ERR_IO_PENDING) { |
| 466 CloseSocket(); | 466 CloseSocket(); |
| 467 } else { | 467 } else { |
| 468 // If ReconsiderProxyAfterError() failed synchronously, it means | 468 // If ReconsiderProxyAfterError() failed synchronously, it means |
| 469 // there was nothing left to fall-back to, so fail the transaction | 469 // there was nothing left to fall-back to, so fail the transaction |
| 470 // with the last connection error we got. | 470 // with the last connection error we got. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 493 // the destroyed socket. | 493 // the destroyed socket. |
| 494 if (connection_handler_) | 494 if (connection_handler_) |
| 495 connection_handler_->Reset(); | 495 connection_handler_->Reset(); |
| 496 | 496 |
| 497 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) | 497 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) |
| 498 socket_handle_.socket()->Disconnect(); | 498 socket_handle_.socket()->Disconnect(); |
| 499 socket_handle_.Reset(); | 499 socket_handle_.Reset(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace gcm | 502 } // namespace gcm |
| OLD | NEW |