OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // HttpBasicStream is a simple implementation of HttpStream. It assumes it is | 5 // HttpBasicStream is a simple implementation of HttpStream. It assumes it is |
6 // not sharing a sharing with any other HttpStreams, therefore it just reads and | 6 // not sharing a sharing with any other HttpStreams, therefore it just reads and |
7 // writes directly to the Http Stream. | 7 // writes directly to the Http Stream. |
8 | 8 |
9 #ifndef NET_HTTP_HTTP_BASIC_STREAM_H_ | 9 #ifndef NET_HTTP_HTTP_BASIC_STREAM_H_ |
10 #define NET_HTTP_HTTP_BASIC_STREAM_H_ | 10 #define NET_HTTP_HTTP_BASIC_STREAM_H_ |
(...skipping 12 matching lines...) Expand all Loading... |
23 class GrowableIOBuffer; | 23 class GrowableIOBuffer; |
24 class HttpResponseInfo; | 24 class HttpResponseInfo; |
25 struct HttpRequestInfo; | 25 struct HttpRequestInfo; |
26 class HttpRequestHeaders; | 26 class HttpRequestHeaders; |
27 class HttpStreamParser; | 27 class HttpStreamParser; |
28 class IOBuffer; | 28 class IOBuffer; |
29 class UploadDataStream; | 29 class UploadDataStream; |
30 | 30 |
31 class HttpBasicStream : public HttpStream { | 31 class HttpBasicStream : public HttpStream { |
32 public: | 32 public: |
33 HttpBasicStream(ClientSocketHandle* connection, bool using_proxy); | 33 // Constructs a new HttpBasicStream. If |parser| is NULL, then |
| 34 // InitializeStream should be called to initialize it correctly. If |
| 35 // |parser| is non-null, then InitializeStream should not be called, |
| 36 // as the stream is already initialized. |
| 37 HttpBasicStream(ClientSocketHandle* connection, |
| 38 HttpStreamParser* parser, |
| 39 bool using_proxy); |
34 virtual ~HttpBasicStream(); | 40 virtual ~HttpBasicStream(); |
35 | 41 |
36 // HttpStream methods: | 42 // HttpStream methods: |
37 virtual int InitializeStream(const HttpRequestInfo* request_info, | 43 virtual int InitializeStream(const HttpRequestInfo* request_info, |
38 const BoundNetLog& net_log, | 44 const BoundNetLog& net_log, |
39 CompletionCallback* callback); | 45 CompletionCallback* callback); |
40 | 46 |
41 virtual int SendRequest(const HttpRequestHeaders& headers, | 47 virtual int SendRequest(const HttpRequestHeaders& headers, |
42 UploadDataStream* request_body, | 48 UploadDataStream* request_body, |
43 HttpResponseInfo* response, | 49 HttpResponseInfo* response, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 std::string request_line_; | 88 std::string request_line_; |
83 | 89 |
84 const HttpRequestInfo* request_info_; | 90 const HttpRequestInfo* request_info_; |
85 | 91 |
86 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 92 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
87 }; | 93 }; |
88 | 94 |
89 } // namespace net | 95 } // namespace net |
90 | 96 |
91 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 97 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
OLD | NEW |