OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
asanka
2011/10/28 14:39:40
Not needed?
| |
17 #include "base/task.h" | 17 #include "base/task.h" |
18 #include "net/base/address_list.h" | 18 #include "net/base/address_list.h" |
19 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
20 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
21 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
22 #include "net/base/net_log.h" | 22 #include "net/base/net_log.h" |
23 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
24 #include "net/base/ssl_config_service.h" | 24 #include "net/base/ssl_config_service.h" |
25 #include "net/http/http_auth.h" | 25 #include "net/http/http_auth.h" |
26 #include "net/http/http_auth_cache.h" | 26 #include "net/http/http_auth_cache.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 // Returns false if size of buffered data would exceeds | 144 // Returns false if size of buffered data would exceeds |
145 // |max_pending_send_allowed_| and |data| is not sent at all. | 145 // |max_pending_send_allowed_| and |data| is not sent at all. |
146 virtual bool SendData(const char* data, int len); | 146 virtual bool SendData(const char* data, int len); |
147 | 147 |
148 // Requests to close the connection. | 148 // Requests to close the connection. |
149 // Once the connection is closed, calls delegate's OnClose. | 149 // Once the connection is closed, calls delegate's OnClose. |
150 virtual void Close(); | 150 virtual void Close(); |
151 | 151 |
152 // Restarts with authentication info. | 152 // Restarts with authentication info. |
153 // Should be used for response of OnAuthRequired. | 153 // Should be used for response of OnAuthRequired. |
154 virtual void RestartWithAuth( | 154 virtual void RestartWithAuth(const AuthCredentials& credentials); |
155 const string16& username, | |
156 const string16& password); | |
157 | 155 |
158 // Detach delegate. Call before delegate is deleted. | 156 // Detach delegate. Call before delegate is deleted. |
159 // Once delegate is detached, close the socket stream and never call delegate | 157 // Once delegate is detached, close the socket stream and never call delegate |
160 // back. | 158 // back. |
161 virtual void DetachDelegate(); | 159 virtual void DetachDelegate(); |
162 | 160 |
163 const ProxyServer& proxy_server() const; | 161 const ProxyServer& proxy_server() const; |
164 | 162 |
165 // Sets an alternative HostResolver. For testing purposes only. | 163 // Sets an alternative HostResolver. For testing purposes only. |
166 void SetHostResolver(HostResolver* host_resolver); | 164 void SetHostResolver(HostResolver* host_resolver); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 bool server_closed_; | 360 bool server_closed_; |
363 | 361 |
364 scoped_ptr<SocketStreamMetrics> metrics_; | 362 scoped_ptr<SocketStreamMetrics> metrics_; |
365 | 363 |
366 DISALLOW_COPY_AND_ASSIGN(SocketStream); | 364 DISALLOW_COPY_AND_ASSIGN(SocketStream); |
367 }; | 365 }; |
368 | 366 |
369 } // namespace net | 367 } // namespace net |
370 | 368 |
371 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ | 369 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ |
OLD | NEW |