| 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 "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
| 9 #include "net/base/load_states.h" | 9 #include "net/base/load_states.h" |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 // Returns the load state for this transaction. | 130 // Returns the load state for this transaction. |
| 131 virtual LoadState GetLoadState() const = 0; | 131 virtual LoadState GetLoadState() const = 0; |
| 132 | 132 |
| 133 // Returns the upload progress in bytes. If there is no upload data, | 133 // Returns the upload progress in bytes. If there is no upload data, |
| 134 // zero will be returned. This does not include the request headers. | 134 // zero will be returned. This does not include the request headers. |
| 135 virtual UploadProgress GetUploadProgress() const = 0; | 135 virtual UploadProgress GetUploadProgress() const = 0; |
| 136 | 136 |
| 137 // SetQuicServerInfo sets a object which reads and writes public information | 137 // SetQuicServerInfo sets a object which reads and writes public information |
| 138 // about a QUIC server. | 138 // about a QUIC server. |
| 139 virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) {}; | 139 virtual void SetQuicServerInfo(QuicServerInfo* quic_server_info) = 0; |
| 140 | 140 |
| 141 // Populates all of load timing, except for request start times and receive | 141 // Populates all of load timing, except for request start times and receive |
| 142 // headers time. | 142 // headers time. |
| 143 // |load_timing_info| must have all null times when called. Returns false and | 143 // |load_timing_info| must have all null times when called. Returns false and |
| 144 // does not modify |load_timing_info| if there's no timing information to | 144 // does not modify |load_timing_info| if there's no timing information to |
| 145 // provide. | 145 // provide. |
| 146 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; | 146 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; |
| 147 | 147 |
| 148 // Called when the priority of the parent job changes. | 148 // Called when the priority of the parent job changes. |
| 149 virtual void SetPriority(RequestPriority priority) = 0; | 149 virtual void SetPriority(RequestPriority priority) = 0; |
| 150 | 150 |
| 151 // Set the WebSocketHandshakeStreamBase::CreateHelper to be used for the | 151 // Set the WebSocketHandshakeStreamBase::CreateHelper to be used for the |
| 152 // request. Only relevant to WebSocket transactions. Must be called before | 152 // request. Only relevant to WebSocket transactions. Must be called before |
| 153 // Start(). Ownership of |create_helper| remains with the caller. | 153 // Start(). Ownership of |create_helper| remains with the caller. |
| 154 virtual void SetWebSocketHandshakeStreamCreateHelper( | 154 virtual void SetWebSocketHandshakeStreamCreateHelper( |
| 155 WebSocketHandshakeStreamBase::CreateHelper* create_helper) = 0; | 155 WebSocketHandshakeStreamBase::CreateHelper* create_helper) = 0; |
| 156 | 156 |
| 157 // Set the callback to receive notification just before network use. | 157 // Set the callback to receive notification just before network use. |
| 158 virtual void SetBeforeNetworkStartCallback( | 158 virtual void SetBeforeNetworkStartCallback( |
| 159 const BeforeNetworkStartCallback& callback) = 0; | 159 const BeforeNetworkStartCallback& callback) = 0; |
| 160 | 160 |
| 161 // Resumes the transaction after being deferred. | 161 // Resumes the transaction after being deferred. |
| 162 virtual int ResumeNetworkStart() = 0; | 162 virtual int ResumeNetworkStart() = 0; |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 } // namespace net | 165 } // namespace net |
| 166 | 166 |
| 167 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 167 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
| OLD | NEW |