| Index: content/common/throttling_url_loader.cc
|
| diff --git a/content/common/throttling_url_loader.cc b/content/common/throttling_url_loader.cc
|
| index 9f258c9d088eb45119684147f6e08bda2be1f69f..b15b12a54d1c60d144b9ae7baf2737711fc7ea39 100644
|
| --- a/content/common/throttling_url_loader.cc
|
| +++ b/content/common/throttling_url_loader.cc
|
| @@ -14,9 +14,10 @@ std::unique_ptr<ThrottlingURLLoader> ThrottlingURLLoader::CreateLoaderAndStart(
|
| int32_t request_id,
|
| uint32_t options,
|
| std::unique_ptr<ResourceRequest> url_request,
|
| - mojom::URLLoaderClient* client) {
|
| - std::unique_ptr<ThrottlingURLLoader> loader(
|
| - new ThrottlingURLLoader(std::move(throttles), client));
|
| + mojom::URLLoaderClient* client,
|
| + const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
|
| + std::unique_ptr<ThrottlingURLLoader> loader(new ThrottlingURLLoader(
|
| + std::move(throttles), client, traffic_annotation));
|
| loader->Start(factory, routing_id, request_id, options,
|
| std::move(url_request));
|
| return loader;
|
| @@ -44,8 +45,11 @@ void ThrottlingURLLoader::SetPriority(net::RequestPriority priority,
|
|
|
| ThrottlingURLLoader::ThrottlingURLLoader(
|
| std::vector<std::unique_ptr<URLLoaderThrottle>> throttles,
|
| - mojom::URLLoaderClient* client)
|
| - : forwarding_client_(client), client_binding_(this) {
|
| + mojom::URLLoaderClient* client,
|
| + const net::MutableNetworkTrafficAnnotationTag& traffic_annotation)
|
| + : forwarding_client_(client),
|
| + client_binding_(this),
|
| + traffic_annotation_(traffic_annotation) {
|
| if (throttles.size() > 0) {
|
| // TODO(yzshen): Implement a URLLoaderThrottle subclass which handles a list
|
| // of URLLoaderThrottles.
|
| @@ -83,7 +87,8 @@ void ThrottlingURLLoader::Start(mojom::URLLoaderFactory* factory,
|
|
|
| factory->CreateLoaderAndStart(mojo::MakeRequest(&url_loader_), routing_id,
|
| request_id, options, *url_request,
|
| - client_binding_.CreateInterfacePtrAndBind());
|
| + client_binding_.CreateInterfacePtrAndBind(),
|
| + traffic_annotation_);
|
| }
|
|
|
| void ThrottlingURLLoader::OnReceiveResponse(
|
| @@ -214,7 +219,8 @@ void ThrottlingURLLoader::Resume() {
|
| case DEFERRED_START: {
|
| url_loader_factory_->CreateLoaderAndStart(
|
| mojo::MakeRequest(&url_loader_), routing_id_, request_id_, options_,
|
| - *url_request_, client_binding_.CreateInterfacePtrAndBind());
|
| + *url_request_, client_binding_.CreateInterfacePtrAndBind(),
|
| + traffic_annotation_);
|
|
|
| if (set_priority_cached_) {
|
| set_priority_cached_ = false;
|
|
|