| 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 // 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_ |
| 11 | 11 |
| 12 #include <stdint.h> | 12 #include <stdint.h> |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "net/base/net_export.h" | |
| 18 #include "net/http/http_basic_state.h" | 17 #include "net/http/http_basic_state.h" |
| 19 #include "net/http/http_stream.h" | 18 #include "net/http/http_stream.h" |
| 20 | 19 |
| 21 namespace net { | 20 namespace net { |
| 22 | 21 |
| 23 class BoundNetLog; | 22 class BoundNetLog; |
| 24 class ClientSocketHandle; | 23 class ClientSocketHandle; |
| 25 class HttpResponseInfo; | 24 class HttpResponseInfo; |
| 26 struct HttpRequestInfo; | 25 struct HttpRequestInfo; |
| 27 class HttpRequestHeaders; | 26 class HttpRequestHeaders; |
| 28 class HttpStreamParser; | 27 class HttpStreamParser; |
| 29 class IOBuffer; | 28 class IOBuffer; |
| 30 | 29 |
| 31 class NET_EXPORT_PRIVATE HttpBasicStream : public HttpStream { | 30 class HttpBasicStream : public HttpStream { |
| 32 public: | 31 public: |
| 33 // Constructs a new HttpBasicStream. InitializeStream must be called to | 32 // Constructs a new HttpBasicStream. InitializeStream must be called to |
| 34 // initialize it correctly. | 33 // initialize it correctly. |
| 35 HttpBasicStream(ClientSocketHandle* connection, bool using_proxy); | 34 HttpBasicStream(ClientSocketHandle* connection, bool using_proxy); |
| 36 ~HttpBasicStream() override; | 35 ~HttpBasicStream() override; |
| 37 | 36 |
| 38 // HttpStream methods: | 37 // HttpStream methods: |
| 39 int InitializeStream(const HttpRequestInfo* request_info, | 38 int InitializeStream(const HttpRequestInfo* request_info, |
| 40 RequestPriority priority, | 39 RequestPriority priority, |
| 41 const BoundNetLog& net_log, | 40 const BoundNetLog& net_log, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 HttpStreamParser* parser() const { return state_.parser(); } | 89 HttpStreamParser* parser() const { return state_.parser(); } |
| 91 | 90 |
| 92 HttpBasicState state_; | 91 HttpBasicState state_; |
| 93 | 92 |
| 94 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 93 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
| 95 }; | 94 }; |
| 96 | 95 |
| 97 } // namespace net | 96 } // namespace net |
| 98 | 97 |
| 99 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 98 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
| OLD | NEW |