Commit 398596d6 authored by Minggang Wang's avatar Minggang Wang Committed by Chromium LUCI CQ

[OnionSoup] Move URLLoaderClientImpl into blink

URLLoaderClientImpl is an implementation of
network::mojom::URLLoaderClient and used by ResourceDispatcher only to
receives messages from a single URLLoader, it couples with the
ResourceDispatcher tightly.

As part of the OnionSoup project, this patch implements:

1. Moves URLLoaderClientImpl to third_party/blink/public/platform/
and decouples it from the ResourceDispatcher by adding an interface of
WebURLLoaderClientObserver.

2. Moves url_loader_client_impl_unittest.cc into blink and decouples
it from the dependency of TestRequestPeer by implementing a
MockWebURLLoaderClientObserver that mostly inherits the functionality of
TestRequestPeer. So, after this patch, the TestRequestPeer will be
only used by the unit test of ResourceDispatcher and could be removed
with the ResourceDispatcher together eventually.

Change-Id: I08793d58623713ee1fc40f9e2395e19ea141f952
Bug: 1110032
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560678Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Minggang Wang <minggang.wang@intel.com>
Cr-Commit-Position: refs/heads/master@{#834642}
parent 69165c19
......@@ -85,8 +85,6 @@ target(link_target_type, "renderer") {
"loader/resource_dispatcher.h",
"loader/sync_load_context.cc",
"loader/sync_load_context.h",
"loader/url_loader_client_impl.cc",
"loader/url_loader_client_impl.h",
"loader/web_url_loader_impl.cc",
"loader/web_url_loader_impl.h",
"loader/web_worker_fetch_context_impl.cc",
......
......@@ -25,7 +25,6 @@
#include "content/common/navigation_params.h"
#include "content/public/renderer/resource_dispatcher_delegate.h"
#include "content/renderer/loader/sync_load_context.h"
#include "content/renderer/loader/url_loader_client_impl.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "net/base/load_flags.h"
......@@ -46,6 +45,7 @@
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
#include "third_party/blink/public/platform/resource_load_info_notifier_wrapper.h"
#include "third_party/blink/public/platform/sync_load_response.h"
#include "third_party/blink/public/platform/web_mojo_url_loader_client.h"
#include "third_party/blink/public/platform/web_request_peer.h"
namespace content {
......@@ -131,6 +131,41 @@ ResourceDispatcher::GetPendingRequestInfo(int request_id) {
return it->second.get();
}
void ResourceDispatcher::FollowPendingRedirect(
PendingRequestInfo* request_info) {
if (request_info->has_pending_redirect &&
request_info->should_follow_redirect) {
request_info->has_pending_redirect = false;
// net::URLRequest clears its request_start on redirect, so should we.
request_info->local_request_start = base::TimeTicks::Now();
// Redirect URL may not be handled by the network service, so force a
// restart in case another URLLoaderFactory should handle the URL.
if (request_info->redirect_requires_loader_restart) {
request_info->url_loader->FollowRedirectForcingRestart();
} else {
request_info->url_loader->FollowRedirect(
request_info->removed_headers, {} /* modified_headers */,
{} /* modified_cors_exempt_headers */);
}
}
}
void ResourceDispatcher::OnTransferSizeUpdated(int request_id,
int32_t transfer_size_diff) {
DCHECK_GT(transfer_size_diff, 0);
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
// TODO(yhirano): Consider using int64_t in
// blink::WebRequestPeer::OnTransferSizeUpdated.
request_info->peer->OnTransferSizeUpdated(transfer_size_diff);
if (!GetPendingRequestInfo(request_id))
return;
request_info->resource_load_info_notifier_wrapper
->NotifyResourceTransferSizeUpdated(transfer_size_diff);
}
void ResourceDispatcher::OnUploadProgress(int request_id,
int64_t position,
int64_t size) {
......@@ -183,16 +218,6 @@ void ResourceDispatcher::OnReceivedCachedMetadata(int request_id,
}
}
void ResourceDispatcher::OnStartLoadingResponseBody(
int request_id,
mojo::ScopedDataPipeConsumerHandle body) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
request_info->peer->OnStartLoadingResponseBody(std::move(body));
}
void ResourceDispatcher::OnReceivedRedirect(
int request_id,
const net::RedirectInfo& redirect_info,
......@@ -248,23 +273,14 @@ void ResourceDispatcher::OnReceivedRedirect(
}
}
void ResourceDispatcher::FollowPendingRedirect(
PendingRequestInfo* request_info) {
if (request_info->has_pending_redirect &&
request_info->should_follow_redirect) {
request_info->has_pending_redirect = false;
// net::URLRequest clears its request_start on redirect, so should we.
request_info->local_request_start = base::TimeTicks::Now();
// Redirect URL may not be handled by the network service, so force a
// restart in case another URLLoaderFactory should handle the URL.
if (request_info->redirect_requires_loader_restart) {
request_info->url_loader->FollowRedirectForcingRestart();
} else {
request_info->url_loader->FollowRedirect(
request_info->removed_headers, {} /* modified_headers */,
{} /* modified_cors_exempt_headers */);
}
}
void ResourceDispatcher::OnStartLoadingResponseBody(
int request_id,
mojo::ScopedDataPipeConsumerHandle body) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
request_info->peer->OnStartLoadingResponseBody(std::move(body));
}
void ResourceDispatcher::OnRequestComplete(
......@@ -317,6 +333,14 @@ void ResourceDispatcher::OnRequestComplete(
peer->OnCompletedRequest(renderer_status);
}
void ResourceDispatcher::EvictFromBackForwardCache(int request_id) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
return request_info->peer->EvictFromBackForwardCache();
}
bool ResourceDispatcher::RemovePendingRequest(
int request_id,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
......@@ -393,30 +417,6 @@ void ResourceDispatcher::DidChangePriority(int request_id,
request_info->url_loader->SetPriority(new_priority, intra_priority_value);
}
void ResourceDispatcher::OnTransferSizeUpdated(int request_id,
int32_t transfer_size_diff) {
DCHECK_GT(transfer_size_diff, 0);
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
// TODO(yhirano): Consider using int64_t in
// blink::WebRequestPeer::OnTransferSizeUpdated.
request_info->peer->OnTransferSizeUpdated(transfer_size_diff);
if (!GetPendingRequestInfo(request_id))
return;
request_info->resource_load_info_notifier_wrapper
->NotifyResourceTransferSizeUpdated(transfer_size_diff);
}
void ResourceDispatcher::EvictFromBackForwardCache(int request_id) {
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
return request_info->peer->EvictFromBackForwardCache();
}
void ResourceDispatcher::SetCorsExemptHeaderList(
const std::vector<std::string>& list) {
cors_exempt_header_list_ = list;
......@@ -547,9 +547,10 @@ int ResourceDispatcher::StartAsync(
pending_request->previews_state = request->previews_state;
std::unique_ptr<URLLoaderClientImpl> client(new URLLoaderClientImpl(
request_id, this, loading_task_runner,
url_loader_factory->BypassRedirectChecks(), request->url));
std::unique_ptr<blink::WebMojoURLLoaderClient> client(
new blink::WebMojoURLLoaderClient(
request_id, this, loading_task_runner,
url_loader_factory->BypassRedirectChecks(), request->url));
std::unique_ptr<blink::ThrottlingURLLoader> url_loader =
blink::ThrottlingURLLoader::CreateLoaderAndStart(
......
......@@ -33,6 +33,7 @@
#include "third_party/blink/public/mojom/blob/blob_registry.mojom-forward.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"
#include "third_party/blink/public/platform/web_mojo_url_loader_client_observer.h"
#include "third_party/blink/public/platform/web_url_loader.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "url/gurl.h"
......@@ -42,6 +43,7 @@ class WaitableEvent;
}
namespace blink {
class WebMojoURLLoaderClient;
class WebRequestPeer;
class ResourceLoadInfoNotifierWrapper;
class ThrottlingURLLoader;
......@@ -62,12 +64,12 @@ class URLLoaderFactory;
namespace content {
class ResourceDispatcherDelegate;
class URLLoaderClientImpl;
// This class serves as a communication interface to the ResourceDispatcherHost
// in the browser process. It can be used from any child process.
// Virtual methods are for tests.
class CONTENT_EXPORT ResourceDispatcher {
class CONTENT_EXPORT ResourceDispatcher
: public blink::WebMojoURLLoaderClientObserver {
public:
// Generates ids for requests initiated by child processes unique to the
// particular process, counted up from 0 (browser initiated requests count
......@@ -79,7 +81,7 @@ class CONTENT_EXPORT ResourceDispatcher {
static int MakeRequestID();
ResourceDispatcher();
virtual ~ResourceDispatcher();
~ResourceDispatcher() override;
// Call this method to load the resource synchronously (i.e., in one shot).
// This is an alternative to the StartAsync method. Be warned that this method
......@@ -160,10 +162,6 @@ class CONTENT_EXPORT ResourceDispatcher {
return weak_factory_.GetWeakPtr();
}
void OnTransferSizeUpdated(int request_id, int32_t transfer_size_diff);
void EvictFromBackForwardCache(int request_id);
// Sets the CORS exempt header list for sanity checking.
void SetCorsExemptHeaderList(const std::vector<std::string>& list);
......@@ -221,7 +219,7 @@ class CONTENT_EXPORT ResourceDispatcher {
// For mojo loading.
std::unique_ptr<blink::ThrottlingURLLoader> url_loader;
std::unique_ptr<URLLoaderClientImpl> url_loader_client;
std::unique_ptr<blink::WebMojoURLLoaderClient> url_loader_client;
// The Client Hints headers that need to be removed from a redirect.
std::vector<std::string> removed_headers;
......@@ -239,19 +237,28 @@ class CONTENT_EXPORT ResourceDispatcher {
// Follows redirect, if any, for the given request.
void FollowPendingRedirect(PendingRequestInfo* request_info);
// Message response handlers, called by the message handler for this process.
void OnUploadProgress(int request_id, int64_t position, int64_t size);
void OnReceivedResponse(int request_id, network::mojom::URLResponseHeadPtr);
void OnReceivedCachedMetadata(int request_id, mojo_base::BigBuffer data);
// Implements blink::WebMojoURLLoaderClientObserver.
void OnTransferSizeUpdated(int request_id,
int32_t transfer_size_diff) override;
void OnUploadProgress(int request_id,
int64_t position,
int64_t size) override;
void OnReceivedResponse(int request_id,
network::mojom::URLResponseHeadPtr) override;
void OnReceivedCachedMetadata(int request_id,
mojo_base::BigBuffer data) override;
void OnReceivedRedirect(
int request_id,
const net::RedirectInfo& redirect_info,
network::mojom::URLResponseHeadPtr response_head,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
void OnStartLoadingResponseBody(int request_id,
mojo::ScopedDataPipeConsumerHandle body);
void OnRequestComplete(int request_id,
const network::URLLoaderCompletionStatus& status);
network::mojom::URLResponseHeadPtr head,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
void OnStartLoadingResponseBody(
int request_id,
mojo::ScopedDataPipeConsumerHandle body) override;
void OnRequestComplete(
int request_id,
const network::URLLoaderCompletionStatus& status) override;
void EvictFromBackForwardCache(int request_id) override;
void ToLocalURLResponseHead(
const PendingRequestInfo& request_info,
......
......@@ -38,6 +38,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/gpu_stream_constants.h"
#include "content/public/common/service_names.mojom.h"
#include "content/public/common/url_utils.h"
#include "content/public/common/webplugininfo.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_frame.h"
......@@ -345,6 +346,13 @@ void RendererBlinkPlatformImpl::PopulateURLResponse(
report_security_info, request_id);
}
bool RendererBlinkPlatformImpl::IsRedirectSafe(const GURL& from_url,
const GURL& to_url) {
return IsSafeRedirectTarget(from_url, to_url) &&
(!GetContentClient()->renderer() || // null in unit tests.
GetContentClient()->renderer()->IsSafeRedirectTarget(to_url));
}
void RendererBlinkPlatformImpl::CacheMetadataInCacheStorage(
const blink::WebURL& url,
base::Time response_time,
......
......@@ -100,6 +100,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
blink::WebURLResponse* response,
bool report_security_info,
int request_id) override;
bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) override;
blink::WebString DefaultLocale() override;
void SuddenTerminationChanged(bool enabled) override;
blink::WebString DatabaseCreateOriginIdentifier(
......
......@@ -2092,7 +2092,6 @@ test("content_unittests") {
"../renderer/loader/sync_load_context_unittest.cc",
"../renderer/loader/test_request_peer.cc",
"../renderer/loader/test_request_peer.h",
"../renderer/loader/url_loader_client_impl_unittest.cc",
"../renderer/loader/web_url_loader_impl_unittest.cc",
"../renderer/media/batching_media_log_unittest.cc",
"../renderer/media/inspector_media_event_handler_unittest.cc",
......
......@@ -62,8 +62,11 @@ def _CheckForWrongMojomIncludes(input_api, output_api):
allowed_interfaces = ('services/network/public/mojom/cross_origin_embedder_policy',
'services/network/public/mojom/fetch_api',
'services/network/public/mojom/load_timing_info',
'services/network/public/mojom/url_loader',
'services/network/public/mojom/url_loader_factory',
'services/network/public/mojom/url_response_head',
'third_party/blink/public/mojom/blob/serialized_blob',
'third_party/blink/public/mojom/fetch/fetch_api_request',
'third_party/blink/public/mojom/loader/resource_load_info',
'third_party/blink/public/mojom/loader/resource_load_info_notifier',
'third_party/blink/public/mojom/worker/subresource_loader_updater',
......
......@@ -228,6 +228,8 @@ source_set("blink_headers") {
"platform/web_memory_pressure_listener.h",
"platform/web_mixed_content.h",
"platform/web_mixed_content_context_type.h",
"platform/web_mojo_url_loader_client.h",
"platform/web_mojo_url_loader_client_observer.h",
"platform/web_navigation_body_loader.h",
"platform/web_network_state_notifier.h",
"platform/web_policy_container.cc",
......
......@@ -84,3 +84,9 @@ include_rules = [
"+third_party/blink/renderer/core",
"+third_party/blink/renderer/platform",
]
specific_include_rules = {
"web_mojo_url_loader_client.h": [
"+services/network/public/mojom/url_loader.mojom.h",
]
}
......@@ -337,6 +337,12 @@ class BLINK_PLATFORM_EXPORT Platform {
WebURLResponse* response,
bool report_security_info,
int request_id) {}
// Determines whether it is safe to redirect from |from_url| to |to_url|.
virtual bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) {
return false;
}
// Public Suffix List --------------------------------------------------
// May return null on some platforms.
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_RENDERER_LOADER_URL_LOADER_CLIENT_IMPL_H_
#define CONTENT_RENDERER_LOADER_URL_LOADER_CLIENT_IMPL_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_H_
#include <stdint.h>
#include <vector>
......@@ -12,11 +12,11 @@
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_url_loader.h"
namespace base {
......@@ -31,33 +31,27 @@ namespace network {
struct URLLoaderCompletionStatus;
} // namespace network
namespace content {
class ResourceDispatcher;
namespace blink {
class WebMojoURLLoaderClientObserver;
class CONTENT_EXPORT URLLoaderClientImpl final
// WebMojoURLLoaderClient is an implementation of
// network::mojom::URLLoaderClient to receive messages from a single URLLoader.
// TODO(https://crbug.com/860403): Move this class from blink/public/platform/
// to blink/renderer/platform/loader/fetch/url_loader/ finally.
class BLINK_PLATFORM_EXPORT WebMojoURLLoaderClient final
: public network::mojom::URLLoaderClient {
public:
URLLoaderClientImpl(int request_id,
ResourceDispatcher* resource_dispatcher,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
bool bypass_redirect_checks,
const GURL& request_url);
~URLLoaderClientImpl() override;
WebMojoURLLoaderClient(
int request_id,
WebMojoURLLoaderClientObserver* url_loader_client_observer,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
bool bypass_redirect_checks,
const GURL& request_url);
~WebMojoURLLoaderClient() override;
// Set the defer status. If loading is deferred, received messages are not
// dispatched to clients until it is set not deferred.
void SetDefersLoading(blink::WebURLLoader::DeferType value);
// Dispatches the messages received after SetDefersLoading is called.
void FlushDeferredMessages();
// Binds this instance to the given URLLoaderClient endpoints so that it can
// start getting the mojo calls from the given loader. This is used only for
// the main resource loading. Otherwise (in regular subresource loading cases)
// |this| is not bound to a client request, but used via ThrottlingURLLoader
// to get client upcalls from the loader.
void Bind(
network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints);
void SetDefersLoading(WebURLLoader::DeferType value);
// network::mojom::URLLoaderClient implementation
void OnReceiveResponse(
......@@ -80,8 +74,6 @@ class CONTENT_EXPORT URLLoaderClientImpl final
blink::WebURLLoader::DeferType::kDeferredWithBackForwardCache;
}
const GURL& last_loaded_url() const { return last_loaded_url_; }
private:
class BodyBuffer;
class DeferredMessage;
......@@ -95,6 +87,10 @@ class CONTENT_EXPORT URLLoaderClientImpl final
bool NeedsStoringMessage() const;
void StoreAndDispatch(std::unique_ptr<DeferredMessage> message);
void OnConnectionClosed();
const GURL& last_loaded_url() const { return last_loaded_url_; }
// Dispatches the messages received after SetDefersLoading is called.
void FlushDeferredMessages();
std::vector<std::unique_ptr<DeferredMessage>> deferred_messages_;
std::unique_ptr<BodyBuffer> body_buffer_;
......@@ -102,10 +98,10 @@ class CONTENT_EXPORT URLLoaderClientImpl final
bool has_received_response_head_ = false;
bool has_received_response_body_ = false;
bool has_received_complete_ = false;
blink::WebURLLoader::DeferType deferred_state_ =
blink::WebURLLoader::DeferType::kNotDeferred;
WebURLLoader::DeferType deferred_state_ =
WebURLLoader::DeferType::kNotDeferred;
int32_t accumulated_transfer_size_diff_during_deferred_ = 0;
ResourceDispatcher* const resource_dispatcher_;
WebMojoURLLoaderClientObserver* const url_loader_client_observer_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
bool bypass_redirect_checks_ = false;
GURL last_loaded_url_;
......@@ -117,9 +113,9 @@ class CONTENT_EXPORT URLLoaderClientImpl final
mojo::Receiver<network::mojom::URLLoaderClient> url_loader_client_receiver_{
this};
base::WeakPtrFactory<URLLoaderClientImpl> weak_factory_{this};
base::WeakPtrFactory<WebMojoURLLoaderClient> weak_factory_{this};
};
} // namespace content
} // namespace blink
#endif // CONTENT_RENDERER_LOADER_URL_LOADER_CLIENT_IMPL_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_H_
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_OBSERVER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_OBSERVER_H_
#include <stdint.h>
#include <string>
#include <vector>
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "services/network/public/mojom/url_response_head.mojom-forward.h"
#include "third_party/blink/public/platform/web_common.h"
namespace net {
struct RedirectInfo;
}
namespace network {
struct URLLoaderCompletionStatus;
}
namespace blink {
// This is implemented by content::ResourceDispatcher to observe
// WebMojoURLLoaderClient that receives messages from a single URLLoader.
// This is a transient class used until WebURLLoaderImpl in content/ is moved to
// Blink.
// TODO(https://crbug.com/1110032): Remove this.
class BLINK_PLATFORM_EXPORT WebMojoURLLoaderClientObserver {
public:
// Called when the transfer size is updated.
virtual void OnTransferSizeUpdated(int request_id,
int32_t transfer_size_diff) = 0;
// Called as upload progress is made.
virtual void OnUploadProgress(int request_id,
int64_t position,
int64_t size) = 0;
// Called when response headers are available.
virtual void OnReceivedResponse(int request_id,
network::mojom::URLResponseHeadPtr) = 0;
// Called when metadata generated by the renderer is retrieved from the
// cache.
virtual void OnReceivedCachedMetadata(int request_id,
mojo_base::BigBuffer data) = 0;
// Called when a redirect occurs.
virtual void OnReceivedRedirect(
int request_id,
const net::RedirectInfo& redirect_info,
network::mojom::URLResponseHeadPtr response_head,
scoped_refptr<base::SingleThreadTaskRunner> task_runner) = 0;
// Called when the response body becomes available.
virtual void OnStartLoadingResponseBody(
int request_id,
mojo::ScopedDataPipeConsumerHandle body) = 0;
// Called when the response is complete.
virtual void OnRequestComplete(
int request_id,
const network::URLLoaderCompletionStatus& status) = 0;
virtual void EvictFromBackForwardCache(int request_id) = 0;
protected:
virtual ~WebMojoURLLoaderClientObserver() = default;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MOJO_URL_LOADER_CLIENT_OBSERVER_H_
......@@ -118,6 +118,7 @@ blink_platform_sources("loader") {
"fetch/unique_identifier.h",
"fetch/url_loader/request_conversion.cc",
"fetch/url_loader/request_conversion.h",
"fetch/url_loader/web_mojo_url_loader_client.cc",
"fetch/url_loader/worker_main_script_loader.cc",
"fetch/url_loader/worker_main_script_loader.h",
"fetch/url_loader/worker_main_script_loader_client.h",
......@@ -195,6 +196,7 @@ source_set("unit_tests") {
"link_header_test.cc",
"static_data_navigation_body_loader_test.cc",
"subresource_integrity_test.cc",
"web_mojo_url_loader_client_unittest.cc",
]
configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
......
......@@ -11,6 +11,8 @@ include_rules = [
"+components/link_header_util", # for LinkHeader.cpp
"+net/base/load_flags.h",
"+net/base/net_errors.h",
"+net/traffic_annotation/network_traffic_annotation_test_helper.h",
"+net/url_request/redirect_info.h",
"+services/metrics/public", # for UKM API
"+services/network/public", # for Fetch API and CORS
"+third_party/blink/renderer/platform/bindings/dom_wrapper_world.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment