| OLD | NEW |
| 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 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
| 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // delete the object if it is changed or the job is destroyed. | 131 // delete the object if it is changed or the job is destroyed. |
| 132 UserData* GetUserData(const void* key) const; | 132 UserData* GetUserData(const void* key) const; |
| 133 void SetUserData(const void* key, UserData* data); | 133 void SetUserData(const void* key, UserData* data); |
| 134 | 134 |
| 135 const GURL& url() const { return url_; } | 135 const GURL& url() const { return url_; } |
| 136 bool is_secure() const; | 136 bool is_secure() const; |
| 137 const AddressList& address_list() const { return addresses_; } | 137 const AddressList& address_list() const { return addresses_; } |
| 138 Delegate* delegate() const { return delegate_; } | 138 Delegate* delegate() const { return delegate_; } |
| 139 int max_pending_send_allowed() const { return max_pending_send_allowed_; } | 139 int max_pending_send_allowed() const { return max_pending_send_allowed_; } |
| 140 | 140 |
| 141 URLRequestContext* context() const { return context_.get(); } | 141 const URLRequestContext* context() const { return context_; } |
| 142 void set_context(URLRequestContext* context); | 142 void set_context(const URLRequestContext* context); |
| 143 | 143 |
| 144 BoundNetLog* net_log() { return &net_log_; } | 144 BoundNetLog* net_log() { return &net_log_; } |
| 145 | 145 |
| 146 // Opens the connection on the IO thread. | 146 // Opens the connection on the IO thread. |
| 147 // Once the connection is established, calls delegate's OnConnected. | 147 // Once the connection is established, calls delegate's OnConnected. |
| 148 virtual void Connect(); | 148 virtual void Connect(); |
| 149 | 149 |
| 150 // Requests to send |len| bytes of |data| on the connection. | 150 // Requests to send |len| bytes of |data| on the connection. |
| 151 // Returns true if |data| is buffered in the job. | 151 // Returns true if |data| is buffered in the job. |
| 152 // Returns false if size of buffered data would exceeds | 152 // Returns false if size of buffered data would exceeds |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 int HandleCertificateError(int result); | 316 int HandleCertificateError(int result); |
| 317 | 317 |
| 318 SSLConfigService* ssl_config_service() const; | 318 SSLConfigService* ssl_config_service() const; |
| 319 ProxyService* proxy_service() const; | 319 ProxyService* proxy_service() const; |
| 320 | 320 |
| 321 BoundNetLog net_log_; | 321 BoundNetLog net_log_; |
| 322 | 322 |
| 323 GURL url_; | 323 GURL url_; |
| 324 int max_pending_send_allowed_; | 324 int max_pending_send_allowed_; |
| 325 scoped_refptr<URLRequestContext> context_; | 325 const URLRequestContext* context_; |
| 326 | 326 |
| 327 UserDataMap user_data_; | 327 UserDataMap user_data_; |
| 328 | 328 |
| 329 State next_state_; | 329 State next_state_; |
| 330 HostResolver* host_resolver_; | 330 HostResolver* host_resolver_; |
| 331 CertVerifier* cert_verifier_; | 331 CertVerifier* cert_verifier_; |
| 332 ServerBoundCertService* server_bound_cert_service_; | 332 ServerBoundCertService* server_bound_cert_service_; |
| 333 HttpAuthHandlerFactory* http_auth_handler_factory_; | 333 HttpAuthHandlerFactory* http_auth_handler_factory_; |
| 334 ClientSocketFactory* factory_; | 334 ClientSocketFactory* factory_; |
| 335 | 335 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 bool server_closed_; | 378 bool server_closed_; |
| 379 | 379 |
| 380 scoped_ptr<SocketStreamMetrics> metrics_; | 380 scoped_ptr<SocketStreamMetrics> metrics_; |
| 381 | 381 |
| 382 DISALLOW_COPY_AND_ASSIGN(SocketStream); | 382 DISALLOW_COPY_AND_ASSIGN(SocketStream); |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 } // namespace net | 385 } // namespace net |
| 386 | 386 |
| 387 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 387 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
| OLD | NEW |