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_ |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 // Constructs a new HttpBasicStream. InitializeStream must be called to | 30 // Constructs a new HttpBasicStream. InitializeStream must be called to |
31 // initialize it correctly. | 31 // initialize it correctly. |
32 HttpBasicStream(ClientSocketHandle* connection, bool using_proxy); | 32 HttpBasicStream(ClientSocketHandle* connection, bool using_proxy); |
33 virtual ~HttpBasicStream(); | 33 virtual ~HttpBasicStream(); |
34 | 34 |
35 // HttpStream methods: | 35 // HttpStream methods: |
36 virtual int InitializeStream(const HttpRequestInfo* request_info, | 36 virtual int InitializeStream(const HttpRequestInfo* request_info, |
37 RequestPriority priority, | 37 RequestPriority priority, |
38 const BoundNetLog& net_log, | 38 const BoundNetLog& net_log, |
39 const CompletionCallback& callback) OVERRIDE; | 39 const CompletionCallback& callback) override; |
40 | 40 |
41 virtual int SendRequest(const HttpRequestHeaders& headers, | 41 virtual int SendRequest(const HttpRequestHeaders& headers, |
42 HttpResponseInfo* response, | 42 HttpResponseInfo* response, |
43 const CompletionCallback& callback) OVERRIDE; | 43 const CompletionCallback& callback) override; |
44 | 44 |
45 virtual UploadProgress GetUploadProgress() const OVERRIDE; | 45 virtual UploadProgress GetUploadProgress() const override; |
46 | 46 |
47 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE; | 47 virtual int ReadResponseHeaders(const CompletionCallback& callback) override; |
48 | 48 |
49 virtual int ReadResponseBody(IOBuffer* buf, | 49 virtual int ReadResponseBody(IOBuffer* buf, |
50 int buf_len, | 50 int buf_len, |
51 const CompletionCallback& callback) OVERRIDE; | 51 const CompletionCallback& callback) override; |
52 | 52 |
53 virtual void Close(bool not_reusable) OVERRIDE; | 53 virtual void Close(bool not_reusable) override; |
54 | 54 |
55 virtual HttpStream* RenewStreamForAuth() OVERRIDE; | 55 virtual HttpStream* RenewStreamForAuth() override; |
56 | 56 |
57 virtual bool IsResponseBodyComplete() const OVERRIDE; | 57 virtual bool IsResponseBodyComplete() const override; |
58 | 58 |
59 virtual bool CanFindEndOfResponse() const OVERRIDE; | 59 virtual bool CanFindEndOfResponse() const override; |
60 | 60 |
61 virtual bool IsConnectionReused() const OVERRIDE; | 61 virtual bool IsConnectionReused() const override; |
62 | 62 |
63 virtual void SetConnectionReused() OVERRIDE; | 63 virtual void SetConnectionReused() override; |
64 | 64 |
65 virtual bool IsConnectionReusable() const OVERRIDE; | 65 virtual bool IsConnectionReusable() const override; |
66 | 66 |
67 virtual int64 GetTotalReceivedBytes() const OVERRIDE; | 67 virtual int64 GetTotalReceivedBytes() const override; |
68 | 68 |
69 virtual bool GetLoadTimingInfo( | 69 virtual bool GetLoadTimingInfo( |
70 LoadTimingInfo* load_timing_info) const OVERRIDE; | 70 LoadTimingInfo* load_timing_info) const override; |
71 | 71 |
72 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 72 virtual void GetSSLInfo(SSLInfo* ssl_info) override; |
73 | 73 |
74 virtual void GetSSLCertRequestInfo( | 74 virtual void GetSSLCertRequestInfo( |
75 SSLCertRequestInfo* cert_request_info) OVERRIDE; | 75 SSLCertRequestInfo* cert_request_info) override; |
76 | 76 |
77 virtual bool IsSpdyHttpStream() const OVERRIDE; | 77 virtual bool IsSpdyHttpStream() const override; |
78 | 78 |
79 virtual void Drain(HttpNetworkSession* session) OVERRIDE; | 79 virtual void Drain(HttpNetworkSession* session) override; |
80 | 80 |
81 virtual void SetPriority(RequestPriority priority) OVERRIDE; | 81 virtual void SetPriority(RequestPriority priority) override; |
82 | 82 |
83 private: | 83 private: |
84 HttpStreamParser* parser() const { return state_.parser(); } | 84 HttpStreamParser* parser() const { return state_.parser(); } |
85 | 85 |
86 HttpBasicState state_; | 86 HttpBasicState state_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 88 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace net | 91 } // namespace net |
92 | 92 |
93 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 93 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
OLD | NEW |