| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 DVLOG(1) << "Resolved proxy with PAC:" << proxy_info_.ToPacString(); | 369 DVLOG(1) << "Resolved proxy with PAC:" << proxy_info_.ToPacString(); |
| 370 | 370 |
| 371 net::SSLConfig ssl_config; | 371 net::SSLConfig ssl_config; |
| 372 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); | 372 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); |
| 373 status = net::InitSocketHandleForTlsConnect( | 373 status = net::InitSocketHandleForTlsConnect( |
| 374 net::HostPortPair::FromURL(GetCurrentEndpoint()), | 374 net::HostPortPair::FromURL(GetCurrentEndpoint()), |
| 375 network_session_.get(), | 375 network_session_.get(), |
| 376 proxy_info_, | 376 proxy_info_, |
| 377 ssl_config, | 377 ssl_config, |
| 378 ssl_config, | 378 ssl_config, |
| 379 net::kPrivacyModeDisabled, | 379 net::PRIVACY_MODE_DISABLED, |
| 380 bound_net_log_, | 380 bound_net_log_, |
| 381 &socket_handle_, | 381 &socket_handle_, |
| 382 base::Bind(&ConnectionFactoryImpl::OnConnectDone, | 382 base::Bind(&ConnectionFactoryImpl::OnConnectDone, |
| 383 weak_ptr_factory_.GetWeakPtr())); | 383 weak_ptr_factory_.GetWeakPtr())); |
| 384 if (status != net::ERR_IO_PENDING) | 384 if (status != net::ERR_IO_PENDING) |
| 385 OnConnectDone(status); | 385 OnConnectDone(status); |
| 386 } | 386 } |
| 387 | 387 |
| 388 // This has largely been copied from | 388 // This has largely been copied from |
| 389 // HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError. This should be | 389 // HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError. This should be |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // the destroyed socket. | 481 // the destroyed socket. |
| 482 if (connection_handler_) | 482 if (connection_handler_) |
| 483 connection_handler_->Reset(); | 483 connection_handler_->Reset(); |
| 484 | 484 |
| 485 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) | 485 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) |
| 486 socket_handle_.socket()->Disconnect(); | 486 socket_handle_.socket()->Disconnect(); |
| 487 socket_handle_.Reset(); | 487 socket_handle_.Reset(); |
| 488 } | 488 } |
| 489 | 489 |
| 490 } // namespace gcm | 490 } // namespace gcm |
| OLD | NEW |