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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 int HandleCertificateError(int result); | 315 int HandleCertificateError(int result); |
316 | 316 |
317 SSLConfigService* ssl_config_service() const; | 317 SSLConfigService* ssl_config_service() const; |
318 ProxyService* proxy_service() const; | 318 ProxyService* proxy_service() const; |
319 | 319 |
320 BoundNetLog net_log_; | 320 BoundNetLog net_log_; |
321 | 321 |
322 GURL url_; | 322 GURL url_; |
323 int max_pending_send_allowed_; | 323 int max_pending_send_allowed_; |
324 scoped_refptr<URLRequestContext> context_; | 324 const URLRequestContext* context_; |
325 | 325 |
326 UserDataMap user_data_; | 326 UserDataMap user_data_; |
327 | 327 |
328 State next_state_; | 328 State next_state_; |
329 HostResolver* host_resolver_; | 329 HostResolver* host_resolver_; |
330 CertVerifier* cert_verifier_; | 330 CertVerifier* cert_verifier_; |
331 ServerBoundCertService* server_bound_cert_service_; | 331 ServerBoundCertService* server_bound_cert_service_; |
332 HttpAuthHandlerFactory* http_auth_handler_factory_; | 332 HttpAuthHandlerFactory* http_auth_handler_factory_; |
333 ClientSocketFactory* factory_; | 333 ClientSocketFactory* factory_; |
334 | 334 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 bool server_closed_; | 377 bool server_closed_; |
378 | 378 |
379 scoped_ptr<SocketStreamMetrics> metrics_; | 379 scoped_ptr<SocketStreamMetrics> metrics_; |
380 | 380 |
381 DISALLOW_COPY_AND_ASSIGN(SocketStream); | 381 DISALLOW_COPY_AND_ASSIGN(SocketStream); |
382 }; | 382 }; |
383 | 383 |
384 } // namespace net | 384 } // namespace net |
385 | 385 |
386 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 386 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
OLD | NEW |