| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SPDY_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Socket methods: | 81 // Socket methods: |
| 82 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 82 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 83 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 83 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 84 virtual bool SetReceiveBufferSize(int32 size); | 84 virtual bool SetReceiveBufferSize(int32 size); |
| 85 virtual bool SetSendBufferSize(int32 size); | 85 virtual bool SetSendBufferSize(int32 size); |
| 86 virtual int GetPeerAddress(AddressList* address) const; | 86 virtual int GetPeerAddress(AddressList* address) const; |
| 87 | 87 |
| 88 // SpdyStream::Delegate methods: | 88 // SpdyStream::Delegate methods: |
| 89 virtual bool OnSendHeadersComplete(int status); | 89 virtual bool OnSendHeadersComplete(int status); |
| 90 virtual int OnSendBody(); | 90 virtual int OnSendBody(); |
| 91 virtual bool OnSendBodyComplete(int status); | 91 virtual bool OnSendBodyComplete(int* status); |
| 92 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 92 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
| 93 base::Time response_time, | 93 base::Time response_time, |
| 94 int status); | 94 int status); |
| 95 virtual void OnDataReceived(const char* data, int length); | 95 virtual void OnDataReceived(const char* data, int length); |
| 96 virtual void OnDataSent(int length); | 96 virtual void OnDataSent(int length); |
| 97 virtual void OnClose(int status); | 97 virtual void OnClose(int status); |
| 98 virtual void set_chunk_callback(ChunkCallback* callback) {} |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 enum State { | 101 enum State { |
| 101 STATE_DISCONNECTED, | 102 STATE_DISCONNECTED, |
| 102 STATE_GENERATE_AUTH_TOKEN, | 103 STATE_GENERATE_AUTH_TOKEN, |
| 103 STATE_GENERATE_AUTH_TOKEN_COMPLETE, | 104 STATE_GENERATE_AUTH_TOKEN_COMPLETE, |
| 104 STATE_SEND_REQUEST, | 105 STATE_SEND_REQUEST, |
| 105 STATE_SEND_REQUEST_COMPLETE, | 106 STATE_SEND_REQUEST_COMPLETE, |
| 106 STATE_READ_REPLY_COMPLETE, | 107 STATE_READ_REPLY_COMPLETE, |
| 107 STATE_OPEN, | 108 STATE_OPEN, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 scoped_ptr<SpdyHttpStream> response_stream_; | 162 scoped_ptr<SpdyHttpStream> response_stream_; |
| 162 | 163 |
| 163 const BoundNetLog net_log_; | 164 const BoundNetLog net_log_; |
| 164 | 165 |
| 165 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); | 166 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 } // namespace net | 169 } // namespace net |
| 169 | 170 |
| 170 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 171 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |