Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: net/http/http_stream.h

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Rebased, removed upload progress plumbing, feedback. (Rebased till refs/heads/master@{#417381}) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC. 5 // HttpStream provides an abstraction for a basic http streams, SPDY, and QUIC.
6 // The HttpStream subtype is expected to manage the underlying transport 6 // The HttpStream subtype is expected to manage the underlying transport
7 // appropriately. For example, a basic http stream will return the transport 7 // appropriately. For example, a basic http stream will return the transport
8 // socket to the pool for reuse. SPDY streams on the other hand leave the 8 // socket to the pool for reuse. SPDY streams on the other hand leave the
9 // transport socket management to the SpdySession. 9 // transport socket management to the SpdySession.
10 10
11 #ifndef NET_HTTP_HTTP_STREAM_H_ 11 #ifndef NET_HTTP_HTTP_STREAM_H_
12 #define NET_HTTP_HTTP_STREAM_H_ 12 #define NET_HTTP_HTTP_STREAM_H_
13 13
14 #include <stdint.h> 14 #include <stdint.h>
15 15
16 #include <memory> 16 #include <memory>
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "net/base/completion_callback.h" 20 #include "net/base/completion_callback.h"
21 #include "net/base/net_error_details.h" 21 #include "net/base/net_error_details.h"
22 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
23 #include "net/base/net_export.h" 23 #include "net/base/net_export.h"
24 #include "net/base/request_priority.h" 24 #include "net/base/request_priority.h"
25 #include "net/base/upload_progress.h"
26 25
27 namespace crypto { 26 namespace crypto {
28 class ECPrivateKey; 27 class ECPrivateKey;
29 } 28 }
30 29
31 namespace net { 30 namespace net {
32 31
33 class BoundNetLog; 32 class BoundNetLog;
34 class HttpNetworkSession; 33 class HttpNetworkSession;
35 class HttpRequestHeaders; 34 class HttpRequestHeaders;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 virtual void Drain(HttpNetworkSession* session) = 0; 169 virtual void Drain(HttpNetworkSession* session) = 0;
171 170
172 // Get the network error details this stream is encountering. 171 // Get the network error details this stream is encountering.
173 // Fills in |details| if it is available; leaves |details| unchanged if it 172 // Fills in |details| if it is available; leaves |details| unchanged if it
174 // is unavailable. 173 // is unavailable.
175 virtual void PopulateNetErrorDetails(NetErrorDetails* details) = 0; 174 virtual void PopulateNetErrorDetails(NetErrorDetails* details) = 0;
176 175
177 // Called when the priority of the parent transaction changes. 176 // Called when the priority of the parent transaction changes.
178 virtual void SetPriority(RequestPriority priority) = 0; 177 virtual void SetPriority(RequestPriority priority) = 0;
179 178
180 // Queries the UploadDataStream for its progress (bytes sent).
181 virtual UploadProgress GetUploadProgress() const = 0;
182
183 // Returns a new (not initialized) stream using the same underlying 179 // Returns a new (not initialized) stream using the same underlying
184 // connection and invalidates the old stream - no further methods should be 180 // connection and invalidates the old stream - no further methods should be
185 // called on the old stream. The caller should ensure that the response body 181 // called on the old stream. The caller should ensure that the response body
186 // from the previous request is drained before calling this method. If the 182 // from the previous request is drained before calling this method. If the
187 // subclass does not support renewing the stream, NULL is returned. 183 // subclass does not support renewing the stream, NULL is returned.
188 virtual HttpStream* RenewStreamForAuth() = 0; 184 virtual HttpStream* RenewStreamForAuth() = 0;
189 185
190 private: 186 private:
191 DISALLOW_COPY_AND_ASSIGN(HttpStream); 187 DISALLOW_COPY_AND_ASSIGN(HttpStream);
192 }; 188 };
193 189
194 } // namespace net 190 } // namespace net
195 191
196 #endif // NET_HTTP_HTTP_STREAM_H_ 192 #endif // NET_HTTP_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698