| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_HTTP_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_H_ |
| 6 #define NET_HTTP_HTTP_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // the error. Any other negative return value indicates that the transaction | 105 // the error. Any other negative return value indicates that the transaction |
| 106 // could not be read. | 106 // could not be read. |
| 107 // | 107 // |
| 108 // NOTE: The transaction is not responsible for deleting the callback object. | 108 // NOTE: The transaction is not responsible for deleting the callback object. |
| 109 // If the operation is not completed immediately, the transaction must acquire | 109 // If the operation is not completed immediately, the transaction must acquire |
| 110 // a reference to the provided buffer. | 110 // a reference to the provided buffer. |
| 111 // | 111 // |
| 112 virtual int Read(IOBuffer* buf, int buf_len, | 112 virtual int Read(IOBuffer* buf, int buf_len, |
| 113 const CompletionCallback& callback) = 0; | 113 const CompletionCallback& callback) = 0; |
| 114 | 114 |
| 115 // Stops further caching of this request by the HTTP cache, if there is any. | 115 // Stops further caching of this request by the HTTP cache. |
| 116 // |
| 117 // Only valid if called after Start() and only when there are no pending |
| 118 // operations. |
| 116 virtual void StopCaching() = 0; | 119 virtual void StopCaching() = 0; |
| 117 | 120 |
| 118 // Gets the full request headers sent to the server. This is guaranteed to | 121 // Gets the full request headers sent to the server. This is guaranteed to |
| 119 // work only if Start returns success and the underlying transaction supports | 122 // work only if Start returns success and the underlying transaction supports |
| 120 // it. (Right now, this is only network transactions, not cache ones.) | 123 // it. (Right now, this is only network transactions, not cache ones.) |
| 121 // | 124 // |
| 122 // Returns true and overwrites headers if it can get the request headers; | 125 // Returns true and overwrites headers if it can get the request headers; |
| 123 // otherwise, returns false and does not modify headers. | 126 // otherwise, returns false and does not modify headers. |
| 124 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; | 127 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; |
| 125 | 128 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 183 |
| 181 // Resumes the transaction after being deferred. | 184 // Resumes the transaction after being deferred. |
| 182 virtual int ResumeNetworkStart() = 0; | 185 virtual int ResumeNetworkStart() = 0; |
| 183 | 186 |
| 184 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; | 187 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; |
| 185 }; | 188 }; |
| 186 | 189 |
| 187 } // namespace net | 190 } // namespace net |
| 188 | 191 |
| 189 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 192 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
| OLD | NEW |