| 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> |
| 13 |
| 12 #include <string> | 14 #include <string> |
| 13 | 15 |
| 14 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 15 #include "net/http/http_basic_state.h" | 17 #include "net/http/http_basic_state.h" |
| 16 #include "net/http/http_stream.h" | 18 #include "net/http/http_stream.h" |
| 17 | 19 |
| 18 namespace net { | 20 namespace net { |
| 19 | 21 |
| 20 class BoundNetLog; | 22 class BoundNetLog; |
| 21 class ClientSocketHandle; | 23 class ClientSocketHandle; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bool IsResponseBodyComplete() const override; | 59 bool IsResponseBodyComplete() const override; |
| 58 | 60 |
| 59 bool IsConnectionReused() const override; | 61 bool IsConnectionReused() const override; |
| 60 | 62 |
| 61 void SetConnectionReused() override; | 63 void SetConnectionReused() override; |
| 62 | 64 |
| 63 bool CanReuseConnection() const override; | 65 bool CanReuseConnection() const override; |
| 64 | 66 |
| 65 int64 GetTotalReceivedBytes() const override; | 67 int64 GetTotalReceivedBytes() const override; |
| 66 | 68 |
| 69 int64_t GetTotalSentBytes() const override; |
| 70 |
| 67 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 71 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
| 68 | 72 |
| 69 void GetSSLInfo(SSLInfo* ssl_info) override; | 73 void GetSSLInfo(SSLInfo* ssl_info) override; |
| 70 | 74 |
| 71 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 75 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
| 72 | 76 |
| 73 void Drain(HttpNetworkSession* session) override; | 77 void Drain(HttpNetworkSession* session) override; |
| 74 | 78 |
| 75 void SetPriority(RequestPriority priority) override; | 79 void SetPriority(RequestPriority priority) override; |
| 76 | 80 |
| 77 private: | 81 private: |
| 78 HttpStreamParser* parser() const { return state_.parser(); } | 82 HttpStreamParser* parser() const { return state_.parser(); } |
| 79 | 83 |
| 80 HttpBasicState state_; | 84 HttpBasicState state_; |
| 81 | 85 |
| 82 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 86 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
| 83 }; | 87 }; |
| 84 | 88 |
| 85 } // namespace net | 89 } // namespace net |
| 86 | 90 |
| 87 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 91 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
| OLD | NEW |