| 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 #ifndef NET_SPDY_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_SPDY_NETWORK_TRANSACTION_H_ |
| 6 #define NET_SPDY_NETWORK_TRANSACTION_H_ | 6 #define NET_SPDY_NETWORK_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <deque> | 9 #include <deque> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 virtual int RestartWithAuth(const std::wstring& username, | 45 virtual int RestartWithAuth(const std::wstring& username, |
| 46 const std::wstring& password, | 46 const std::wstring& password, |
| 47 CompletionCallback* callback); | 47 CompletionCallback* callback); |
| 48 virtual bool IsReadyToRestartForAuth() { return false; } | 48 virtual bool IsReadyToRestartForAuth() { return false; } |
| 49 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 49 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 50 virtual void StopCaching() {} | 50 virtual void StopCaching() {} |
| 51 virtual const HttpResponseInfo* GetResponseInfo() const; | 51 virtual const HttpResponseInfo* GetResponseInfo() const; |
| 52 virtual LoadState GetLoadState() const; | 52 virtual LoadState GetLoadState() const; |
| 53 virtual uint64 GetUploadProgress() const; | 53 virtual uint64 GetUploadProgress() const; |
| 54 | 54 |
| 55 // Provide access to the stream for testing. | |
| 56 friend class SpdyNetworkTransactionTest; | |
| 57 | |
| 58 private: | 55 private: |
| 59 enum State { | 56 enum State { |
| 60 STATE_INIT_CONNECTION, | 57 STATE_INIT_CONNECTION, |
| 61 STATE_INIT_CONNECTION_COMPLETE, | 58 STATE_INIT_CONNECTION_COMPLETE, |
| 62 STATE_SEND_REQUEST, | 59 STATE_SEND_REQUEST, |
| 63 STATE_SEND_REQUEST_COMPLETE, | 60 STATE_SEND_REQUEST_COMPLETE, |
| 64 STATE_READ_HEADERS, | 61 STATE_READ_HEADERS, |
| 65 STATE_READ_HEADERS_COMPLETE, | 62 STATE_READ_HEADERS_COMPLETE, |
| 66 STATE_READ_BODY, | 63 STATE_READ_BODY, |
| 67 STATE_READ_BODY_COMPLETE, | 64 STATE_READ_BODY_COMPLETE, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 State next_state_; | 107 State next_state_; |
| 111 | 108 |
| 112 scoped_ptr<SpdyHttpStream> stream_; | 109 scoped_ptr<SpdyHttpStream> stream_; |
| 113 | 110 |
| 114 DISALLOW_COPY_AND_ASSIGN(SpdyNetworkTransaction); | 111 DISALLOW_COPY_AND_ASSIGN(SpdyNetworkTransaction); |
| 115 }; | 112 }; |
| 116 | 113 |
| 117 } // namespace net | 114 } // namespace net |
| 118 | 115 |
| 119 #endif // NET_SPDY_NETWORK_TRANSACTION_H_ | 116 #endif // NET_SPDY_NETWORK_TRANSACTION_H_ |
| OLD | NEW |