| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ | 5 #ifndef NET_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ |
| 6 #define NET_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ | 6 #define NET_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "net/base/load_timing_info.h" | 12 #include "net/base/load_timing_info.h" |
| 13 #include "net/http/http_stream.h" | 13 #include "net/http/http_stream.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 class HttpResponseInfo; |
| 18 |
| 17 // A dummy HttpStream with no body used when a redirect is returned | 19 // A dummy HttpStream with no body used when a redirect is returned |
| 18 // from a proxy. | 20 // from a proxy. |
| 19 class ProxyConnectRedirectHttpStream : public HttpStream { | 21 class ProxyConnectRedirectHttpStream : public HttpStream { |
| 20 public: | 22 public: |
| 21 // |load_timing_info| is the info that should be returned by | 23 // |load_timing_info| is the info that should be returned by |
| 22 // GetLoadTimingInfo(), or NULL if there is none. Does not take | 24 // GetLoadTimingInfo(), or NULL if there is none. Does not take |
| 23 // ownership of |load_timing_info|. | 25 // ownership of |load_timing_info|. |
| 24 explicit ProxyConnectRedirectHttpStream(LoadTimingInfo* load_timing_info); | 26 explicit ProxyConnectRedirectHttpStream(LoadTimingInfo* load_timing_info); |
| 25 ~ProxyConnectRedirectHttpStream() override; | 27 ~ProxyConnectRedirectHttpStream() override; |
| 26 | 28 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 52 int64_t GetTotalSentBytes() const override; | 54 int64_t GetTotalSentBytes() const override; |
| 53 | 55 |
| 54 // This function may be called. | 56 // This function may be called. |
| 55 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 57 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
| 56 | 58 |
| 57 void GetSSLInfo(SSLInfo* ssl_info) override; | 59 void GetSSLInfo(SSLInfo* ssl_info) override; |
| 58 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 60 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
| 59 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; | 61 bool GetRemoteEndpoint(IPEndPoint* endpoint) override; |
| 60 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 62 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 61 std::vector<uint8_t>* out) override; | 63 std::vector<uint8_t>* out) override; |
| 62 void Drain(HttpNetworkSession* session) override; | 64 void Drain(HttpNetworkSession* session, |
| 65 scoped_ptr<HttpResponseInfo> response_info) override; |
| 63 void PopulateNetErrorDetails(NetErrorDetails* details) override; | 66 void PopulateNetErrorDetails(NetErrorDetails* details) override; |
| 64 | 67 |
| 65 // This function may be called. | 68 // This function may be called. |
| 66 void SetPriority(RequestPriority priority) override; | 69 void SetPriority(RequestPriority priority) override; |
| 67 | 70 |
| 68 UploadProgress GetUploadProgress() const override; | 71 UploadProgress GetUploadProgress() const override; |
| 69 HttpStream* RenewStreamForAuth() override; | 72 HttpStream* RenewStreamForAuth() override; |
| 70 | 73 |
| 71 private: | 74 private: |
| 72 bool has_load_timing_info_; | 75 bool has_load_timing_info_; |
| 73 LoadTimingInfo load_timing_info_; | 76 LoadTimingInfo load_timing_info_; |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 } // namespace net | 79 } // namespace net |
| 77 | 80 |
| 78 #endif // NET_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ | 81 #endif // NET_HTTP_PROXY_CONNECT_REDIRECT_HTTP_STREAM_H_ |
| OLD | NEW |