diff options
Diffstat (limited to 'chromium/services/network/url_loader.h')
-rw-r--r-- | chromium/services/network/url_loader.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/chromium/services/network/url_loader.h b/chromium/services/network/url_loader.h index a8c41f64ae6..33e6b100ef3 100644 --- a/chromium/services/network/url_loader.h +++ b/chromium/services/network/url_loader.h @@ -29,6 +29,7 @@ #include "net/url_request/url_request.h" #include "services/network/cross_origin_read_blocking.h" #include "services/network/keepalive_statistics_recorder.h" +#include "services/network/network_service.h" #include "services/network/public/cpp/initiator_lock_compatibility.h" #include "services/network/public/mojom/cookie_access_observer.mojom.h" #include "services/network/public/mojom/cross_origin_embedder_policy.mojom-forward.h" @@ -46,7 +47,7 @@ namespace net { class HttpResponseHeaders; class URLRequestContext; -} +} // namespace net namespace network { @@ -104,6 +105,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader int32_t options, const ResourceRequest& request, mojo::PendingRemote<mojom::URLLoaderClient> url_loader_client, + base::Optional<DataPipeUseTracker> response_body_use_tracker, const net::NetworkTrafficAnnotationTag& traffic_annotation, const mojom::URLLoaderFactoryParams* factory_params, mojom::CrossOriginEmbedderPolicyReporter* reporter, @@ -208,6 +210,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader const net::HttpRequestHeaders& request_headers, bool added_during_redirect); + static bool HasFetchStreamingUploadBody(const ResourceRequest*); + private: // This class is used to set the URLLoader as user data on a URLRequest. This // is used instead of URLLoader directly because SetUserData requires a @@ -359,6 +363,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader int64_t total_written_bytes_ = 0; mojo::ScopedDataPipeProducerHandle response_body_stream_; + base::Optional<DataPipeUseTracker> response_body_use_tracker_; scoped_refptr<NetToMojoPendingBuffer> pending_write_; uint32_t pending_write_buffer_size_ = 0; uint32_t pending_write_buffer_offset_ = 0; @@ -490,6 +495,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader // Observer listening to all cookie reads and writes made by this request. mojo::Remote<mojom::CookieAccessObserver> cookie_observer_; + // Indicates |url_request_| is fetch upload request and that has streaming + // body. + const bool has_fetch_streaming_upload_body_; + + // Indicates whether fetch upload streaming is allowed/rejected over H/1. + // Even if this is false but there is a QUIC/H2 stream, the upload is allowed. + const bool allow_http1_for_streaming_upload_; + base::WeakPtrFactory<URLLoader> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(URLLoader); |