| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/socket/client_socket_handle.h" | 5 #include "net/socket/client_socket_handle.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/histogram.h" | 8 #include "base/histogram.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 pool_ = NULL; | 52 pool_ = NULL; |
| 53 idle_time_ = base::TimeDelta(); | 53 idle_time_ = base::TimeDelta(); |
| 54 init_time_ = base::TimeTicks(); | 54 init_time_ = base::TimeTicks(); |
| 55 setup_time_ = base::TimeDelta(); | 55 setup_time_ = base::TimeDelta(); |
| 56 pool_id_ = -1; | 56 pool_id_ = -1; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void ClientSocketHandle::ResetErrorState() { | 59 void ClientSocketHandle::ResetErrorState() { |
| 60 is_ssl_error_ = false; | 60 is_ssl_error_ = false; |
| 61 ssl_error_response_info_ = HttpResponseInfo(); | 61 ssl_error_response_info_ = HttpResponseInfo(); |
| 62 pending_http_proxy_connection_.reset(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 LoadState ClientSocketHandle::GetLoadState() const { | 65 LoadState ClientSocketHandle::GetLoadState() const { |
| 65 CHECK(!is_initialized()); | 66 CHECK(!is_initialized()); |
| 66 CHECK(!group_name_.empty()); | 67 CHECK(!group_name_.empty()); |
| 67 // Because of http://crbug.com/37810 we may not have a pool, but have | 68 // Because of http://crbug.com/37810 we may not have a pool, but have |
| 68 // just a raw socket. | 69 // just a raw socket. |
| 69 if (!pool_) | 70 if (!pool_) |
| 70 return LOAD_STATE_IDLE; | 71 return LOAD_STATE_IDLE; |
| 71 return pool_->GetLoadState(group_name_, this); | 72 return pool_->GetLoadState(group_name_, this); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // TODO(eroman): This logging is not complete, in particular set_socket() and | 113 // TODO(eroman): This logging is not complete, in particular set_socket() and |
| 113 // release() socket. It ends up working though, since those methods are being | 114 // release() socket. It ends up working though, since those methods are being |
| 114 // used to layer sockets (and the destination sources are the same). | 115 // used to layer sockets (and the destination sources are the same). |
| 115 DCHECK(socket_.get()); | 116 DCHECK(socket_.get()); |
| 116 socket_->NetLog().BeginEvent( | 117 socket_->NetLog().BeginEvent( |
| 117 NetLog::TYPE_SOCKET_IN_USE, | 118 NetLog::TYPE_SOCKET_IN_USE, |
| 118 new NetLogSourceParameter("source_dependency", requesting_source_)); | 119 new NetLogSourceParameter("source_dependency", requesting_source_)); |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace net | 122 } // namespace net |
| OLD | NEW |