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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 DVLOG(1) << "Resolved proxy with PAC:" << proxy_info_.ToPacString(); | 324 DVLOG(1) << "Resolved proxy with PAC:" << proxy_info_.ToPacString(); |
325 | 325 |
326 net::SSLConfig ssl_config; | 326 net::SSLConfig ssl_config; |
327 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); | 327 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); |
328 status = net::InitSocketHandleForTlsConnect( | 328 status = net::InitSocketHandleForTlsConnect( |
329 net::HostPortPair::FromURL(GetCurrentEndpoint()), | 329 net::HostPortPair::FromURL(GetCurrentEndpoint()), |
330 network_session_.get(), | 330 network_session_.get(), |
331 proxy_info_, | 331 proxy_info_, |
332 ssl_config, | 332 ssl_config, |
333 ssl_config, | 333 ssl_config, |
334 net::PRIVACY_MODE_DISABLED, | 334 net::kPrivacyModeDisabled, |
335 bound_net_log_, | 335 bound_net_log_, |
336 &socket_handle_, | 336 &socket_handle_, |
337 base::Bind(&ConnectionFactoryImpl::OnConnectDone, | 337 base::Bind(&ConnectionFactoryImpl::OnConnectDone, |
338 weak_ptr_factory_.GetWeakPtr())); | 338 weak_ptr_factory_.GetWeakPtr())); |
339 if (status != net::ERR_IO_PENDING) | 339 if (status != net::ERR_IO_PENDING) |
340 OnConnectDone(status); | 340 OnConnectDone(status); |
341 } | 341 } |
342 | 342 |
343 // This has largely been copied from | 343 // This has largely been copied from |
344 // HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError. This should be | 344 // HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError. This should be |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 // the destroyed socket. | 436 // the destroyed socket. |
437 if (connection_handler_) | 437 if (connection_handler_) |
438 connection_handler_->Reset(); | 438 connection_handler_->Reset(); |
439 | 439 |
440 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) | 440 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) |
441 socket_handle_.socket()->Disconnect(); | 441 socket_handle_.socket()->Disconnect(); |
442 socket_handle_.Reset(); | 442 socket_handle_.Reset(); |
443 } | 443 } |
444 | 444 |
445 } // namespace gcm | 445 } // namespace gcm |
OLD | NEW |