| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // could not be read. | 113 // could not be read. |
| 114 // | 114 // |
| 115 // NOTE: The transaction is not responsible for deleting the callback object. | 115 // NOTE: The transaction is not responsible for deleting the callback object. |
| 116 // If the operation is not completed immediately, the transaction must acquire | 116 // If the operation is not completed immediately, the transaction must acquire |
| 117 // a reference to the provided buffer. | 117 // a reference to the provided buffer. |
| 118 // | 118 // |
| 119 virtual int Read(IOBuffer* buf, int buf_len, | 119 virtual int Read(IOBuffer* buf, int buf_len, |
| 120 const CompletionCallback& callback) = 0; | 120 const CompletionCallback& callback) = 0; |
| 121 | 121 |
| 122 // Stops further caching of this request by the HTTP cache, if there is any. | 122 // Stops further caching of this request by the HTTP cache, if there is any. |
| 123 // If there are multiple requests for this resource that are writing to the |
| 124 // cache using SharedWriters, caching may not be stopped. |
| 123 virtual void StopCaching() = 0; | 125 virtual void StopCaching() = 0; |
| 124 | 126 |
| 125 // Gets the full request headers sent to the server. This is guaranteed to | 127 // Gets the full request headers sent to the server. This is guaranteed to |
| 126 // work only if Start returns success and the underlying transaction supports | 128 // work only if Start returns success and the underlying transaction supports |
| 127 // it. (Right now, this is only network transactions, not cache ones.) | 129 // it. (Right now, this is only network transactions, not cache ones.) |
| 128 // | 130 // |
| 129 // Returns true and overwrites headers if it can get the request headers; | 131 // Returns true and overwrites headers if it can get the request headers; |
| 130 // otherwise, returns false and does not modify headers. | 132 // otherwise, returns false and does not modify headers. |
| 131 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; | 133 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; |
| 132 | 134 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 194 |
| 193 // Resumes the transaction after being deferred. | 195 // Resumes the transaction after being deferred. |
| 194 virtual int ResumeNetworkStart() = 0; | 196 virtual int ResumeNetworkStart() = 0; |
| 195 | 197 |
| 196 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; | 198 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 } // namespace net | 201 } // namespace net |
| 200 | 202 |
| 201 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 203 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
| OLD | NEW |