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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // Gets the full request headers sent to the server. This is guaranteed to | 118 // 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 | 119 // work only if Start returns success and the underlying transaction supports |
120 // it. (Right now, this is only network transactions, not cache ones.) | 120 // it. (Right now, this is only network transactions, not cache ones.) |
121 // | 121 // |
122 // Returns true and overwrites headers if it can get the request headers; | 122 // Returns true and overwrites headers if it can get the request headers; |
123 // otherwise, returns false and does not modify headers. | 123 // otherwise, returns false and does not modify headers. |
124 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; | 124 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; |
125 | 125 |
126 // Get the number of bytes received from network. | 126 // Get the number of bytes received from network. |
127 virtual int64 GetTotalReceivedBytes() const = 0; | 127 virtual int64_t GetTotalReceivedBytes() const = 0; |
128 | 128 |
129 // Get the number of bytes sent over the network. | 129 // Get the number of bytes sent over the network. |
130 virtual int64_t GetTotalSentBytes() const = 0; | 130 virtual int64_t GetTotalSentBytes() const = 0; |
131 | 131 |
132 // Called to tell the transaction that we have successfully reached the end | 132 // Called to tell the transaction that we have successfully reached the end |
133 // of the stream. This is equivalent to performing an extra Read() at the end | 133 // of the stream. This is equivalent to performing an extra Read() at the end |
134 // that should return 0 bytes. This method should not be called if the | 134 // that should return 0 bytes. This method should not be called if the |
135 // transaction is busy processing a previous operation (like a pending Read). | 135 // transaction is busy processing a previous operation (like a pending Read). |
136 // | 136 // |
137 // DoneReading may also be called before the first Read() to notify that the | 137 // DoneReading may also be called before the first Read() to notify that the |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 // Resumes the transaction after being deferred. | 181 // Resumes the transaction after being deferred. |
182 virtual int ResumeNetworkStart() = 0; | 182 virtual int ResumeNetworkStart() = 0; |
183 | 183 |
184 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; | 184 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; |
185 }; | 185 }; |
186 | 186 |
187 } // namespace net | 187 } // namespace net |
188 | 188 |
189 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 189 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
OLD | NEW |