summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h b/chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h
index 2af483ea74d..3fdebfd5142 100644
--- a/chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h
+++ b/chromium/third_party/blink/renderer/platform/testing/weburl_loader_mock_factory_impl.h
@@ -18,6 +18,10 @@
#include "third_party/blink/renderer/platform/weborigin/kurl_hash.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
+namespace network {
+struct ResourceRequest;
+} // namespace network
+
namespace blink {
class TestingPlatformSupport;
@@ -58,12 +62,12 @@ class WebURLLoaderMockFactoryImpl : public WebURLLoaderMockFactory {
bool IsMockedURL(const WebURL& url);
// Called by the loader to load a resource.
- void LoadSynchronously(const WebURLRequest& request,
+ void LoadSynchronously(std::unique_ptr<network::ResourceRequest> request,
WebURLResponse* response,
base::Optional<WebURLError>* error,
WebData* data,
int64_t* encoded_data_length);
- void LoadAsynchronouly(const WebURLRequest& request,
+ void LoadAsynchronouly(std::unique_ptr<network::ResourceRequest> request,
WebURLLoaderMock* loader);
// Removes the loader from the list of pending loaders.
@@ -101,7 +105,8 @@ class WebURLLoaderMockFactoryImpl : public WebURLLoaderMockFactory {
WebURLLoaderTestDelegate* delegate_ = nullptr;
// The loaders that have not being served data yet.
- using LoaderToRequestMap = HashMap<WebURLLoaderMock*, WebURLRequest>;
+ using LoaderToRequestMap =
+ HashMap<WebURLLoaderMock*, std::unique_ptr<network::ResourceRequest>>;
LoaderToRequestMap pending_loaders_;
// All values must be valid, but we use Optional because HashMap requires