Commit e3f159a4 authored by ananta's avatar ananta Committed by Commit bot

Provide skeleton functionality for AppCache handling in the network service.

We have a new class AppCacheNetworkServiceHandler which gets created on the IO thread.
This class provides functionality for checking if a request can be serviced out of the AppCache.
I was looking at AppCacheRequestHandler for this as well. However that class is tied deeply to
the underlying job which gets a touch complicated for lifetime managemnt if the request is not really
being served out the cache.

Added some comments for that class to see if we could remove it once the pieces begin to align.

This class implements the AppCacheStorage::Delegate interface which tells us if a response is available
for a URL. Currently we just trace if a response is found and call the StartURLRequest callback in both cases.

Going forward the plan is to create a URLLoaderFactory for AppCache and pass it back to the callback.
Optionally we could create the loader right there as well. Thanks to jam for pointing that out.

The other changes are to have the original ResourceRequest pointer in the AppCacheURLLoaderRequest class instead
of a copy. We ensure that ownership is transferred correctly.

BUG=715632

Review-Url: https://codereview.chromium.org/2874663004
Cr-Commit-Position: refs/heads/master@{#471120}
parent 03bf758e
...@@ -323,6 +323,8 @@ source_set("browser") { ...@@ -323,6 +323,8 @@ source_set("browser") {
"appcache/appcache_navigation_handle.h", "appcache/appcache_navigation_handle.h",
"appcache/appcache_navigation_handle_core.cc", "appcache/appcache_navigation_handle_core.cc",
"appcache/appcache_navigation_handle_core.h", "appcache/appcache_navigation_handle_core.h",
"appcache/appcache_network_service_handler.cc",
"appcache/appcache_network_service_handler.h",
"appcache/appcache_policy.h", "appcache/appcache_policy.h",
"appcache/appcache_quota_client.cc", "appcache/appcache_quota_client.cc",
"appcache/appcache_quota_client.h", "appcache/appcache_quota_client.h",
......
...@@ -42,6 +42,10 @@ net::URLRequestJob* AppCacheJob::AsURLRequestJob() { ...@@ -42,6 +42,10 @@ net::URLRequestJob* AppCacheJob::AsURLRequestJob() {
return nullptr; return nullptr;
} }
AppCacheURLLoaderJob* AppCacheJob::AsURLLoaderJob() {
return nullptr;
}
AppCacheJob::AppCacheJob() : weak_factory_(this) {} AppCacheJob::AppCacheJob() : weak_factory_(this) {}
} // namespace content } // namespace content
...@@ -25,6 +25,7 @@ class AppCacheEntry; ...@@ -25,6 +25,7 @@ class AppCacheEntry;
class AppCacheHost; class AppCacheHost;
class AppCacheRequest; class AppCacheRequest;
class AppCacheStorage; class AppCacheStorage;
class AppCacheURLLoaderJob;
class URLRequestJob; class URLRequestJob;
// Interface for an AppCache job. This is used to send data stored in the // Interface for an AppCache job. This is used to send data stored in the
...@@ -100,9 +101,13 @@ class CONTENT_EXPORT AppCacheJob ...@@ -100,9 +101,13 @@ class CONTENT_EXPORT AppCacheJob
virtual const GURL& GetURL() const = 0; virtual const GURL& GetURL() const = 0;
// Returns the underlying URLRequestJob if any. This only applies to // Returns the underlying URLRequestJob if any. This only applies to
// AppCaches loaded via the URLRequest mechanism. // AppCaches loaded via the URLLoader mechanism.
virtual net::URLRequestJob* AsURLRequestJob(); virtual net::URLRequestJob* AsURLRequestJob();
// Returns the underlying ApppCacheURLLoaderJob if any. This only applies to
// AppCaches loaded via the URLRequest mechanism.
virtual AppCacheURLLoaderJob* AsURLLoaderJob();
protected: protected:
AppCacheJob(); AppCacheJob();
......
// Copyright (c) 2011 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.
#include "content/browser/appcache/appcache_network_service_handler.h"
#include "base/bind.h"
#include "base/logging.h"
#include "content/browser/appcache/appcache_entry.h"
#include "content/browser/appcache/appcache_host.h"
#include "content/browser/appcache/appcache_navigation_handle_core.h"
#include "content/browser/appcache/appcache_policy.h"
#include "content/browser/appcache/appcache_request.h"
#include "content/public/browser/browser_thread.h"
namespace content {
AppCacheNetworkServiceHandler::AppCacheNetworkServiceHandler(
std::unique_ptr<ResourceRequest> resource_request,
AppCacheNavigationHandleCore* navigation_handle_core,
base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
std::unique_ptr<ResourceRequest>)> callback)
: resource_request_(std::move(resource_request)),
callback_(callback),
storage_(navigation_handle_core->host()->storage()),
host_(navigation_handle_core->host()) {}
AppCacheNetworkServiceHandler::~AppCacheNetworkServiceHandler() {}
void AppCacheNetworkServiceHandler::Start() {
storage_->FindResponseForMainRequest(resource_request_->url, GURL(), this);
}
void AppCacheNetworkServiceHandler::OnMainResponseFound(
const GURL& url,
const AppCacheEntry& entry,
const GURL& fallback_url,
const AppCacheEntry& fallback_entry,
int64_t cache_id,
int64_t group_id,
const GURL& manifest_url) {
AppCachePolicy* policy = host_->service()->appcache_policy();
bool was_blocked_by_policy =
!manifest_url.is_empty() && policy &&
!policy->CanLoadAppCache(manifest_url, host_->first_party_url());
if (was_blocked_by_policy || !entry.has_response_id() ||
cache_id == kAppCacheNoCacheId) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(callback_,
base::Passed(mojom::URLLoaderFactoryPtrInfo()),
base::Passed(std::move(resource_request_))));
} else {
DLOG(WARNING) << "AppCache found for url " << url
<< " falling back to network for now\n";
// TODO(ananta)
// Pass a URLLoaderFactory pointer which supports serving URL requests from
// the cache. The other option is to create the loader directly here.
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(callback_,
base::Passed(mojom::URLLoaderFactoryPtrInfo()),
base::Passed(std::move(resource_request_))));
}
delete this;
}
} // namespace content
\ No newline at end of file
// Copyright (c) 2017 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 CONTENT_BROWSER_APPCACHE_APPCACHE_NETWORK_SERVICE_HANDLER_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_NETWORK_SERVICE_HANDLER_
#include <memory>
#include "base/macros.h"
#include "content/browser/appcache/appcache_service_impl.h"
#include "content/browser/appcache/appcache_storage.h"
#include "content/common/content_export.h"
#include "content/common/url_loader_factory.mojom.h"
#include "content/public/common/resource_type.h"
namespace content {
class AppCacheEntry;
class AppCacheHost;
class AppCacheNavigationHandleCore;
class AppCacheStorage;
class ResourceContext;
struct ResourceRequest;
// This class is instantiated during navigation, to check if the URL being
// navigated to can be served out of the AppCache.
// The AppCacheRequestHandler class provides this functionality as well.
// However it is tightly coupled with the underlying job and the lifetime
// of that class gets a touch complicated. The AppCacheRequestHandler is
// generally associated with a request and it dies when the request goes away.
// For this case, we are just checking if the URL can be served out of the
// cache. If yes, then the plan is to create a URLLoaderFactory which can serve
// URL requests from the cache.
// TODO(ananta)
// Look into whether we can get rid of this class when the overall picture of
// how AppCache interacts with the network service gets clearer.
class CONTENT_EXPORT AppCacheNetworkServiceHandler
: public AppCacheStorage::Delegate {
public:
AppCacheNetworkServiceHandler(
std::unique_ptr<ResourceRequest> resource_request,
AppCacheNavigationHandleCore* navigation_handle_core,
base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
std::unique_ptr<ResourceRequest>)> callback);
~AppCacheNetworkServiceHandler() override;
// Called to start the process of looking up the URL in the AppCache
// database,
void Start();
// AppCacheStorage::Delegate methods
// The AppCacheNetworkServiceHandler instance is deleted on return from this
// function.
void OnMainResponseFound(const GURL& url,
const AppCacheEntry& entry,
const GURL& fallback_url,
const AppCacheEntry& fallback_entry,
int64_t cache_id,
int64_t group_id,
const GURL& mainfest_url) override;
private:
std::unique_ptr<ResourceRequest> resource_request_;
// Callback to invoke when we make a determination on whether the request is
// to be served from the cache or network.
base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
std::unique_ptr<ResourceRequest>)> callback_;
AppCacheStorage* storage_;
// The precreated host pointer from the AppCacheNavigationHandleCore class.
// The ownership of this pointer stays with the AppCacheNavigationHandleCore
// class.
AppCacheHost* host_;
DISALLOW_COPY_AND_ASSIGN(AppCacheNetworkServiceHandler);
};
} // namespace content
#endif // CONTENT_BROWSER_APPCACHE_APPCACHE_NETWORK_SERVICE_HANDLER_
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "content/browser/appcache/appcache.h" #include "content/browser/appcache/appcache.h"
#include "content/browser/appcache/appcache_backend_impl.h" #include "content/browser/appcache/appcache_backend_impl.h"
#include "content/browser/appcache/appcache_network_service_handler.h"
#include "content/browser/appcache/appcache_policy.h" #include "content/browser/appcache/appcache_policy.h"
#include "content/browser/appcache/appcache_request.h" #include "content/browser/appcache/appcache_request.h"
#include "content/browser/appcache/appcache_url_request_job.h" #include "content/browser/appcache/appcache_url_request_job.h"
...@@ -223,6 +224,23 @@ void AppCacheRequestHandler::MaybeCompleteCrossSiteTransferInOldProcess( ...@@ -223,6 +224,23 @@ void AppCacheRequestHandler::MaybeCompleteCrossSiteTransferInOldProcess(
CompleteCrossSiteTransfer(old_process_id_, old_host_id_); CompleteCrossSiteTransfer(old_process_id_, old_host_id_);
} }
// static.
void AppCacheRequestHandler::InitializeForNavigationNetworkService(
std::unique_ptr<ResourceRequest> resource_request,
ResourceContext* resource_context,
AppCacheNavigationHandleCore* navigation_handle_core,
ResourceType resource_type,
base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
std::unique_ptr<ResourceRequest>)> callback) {
// This instance is deleted when it receives a callback from the
// AppCacheStorage class which contains information about the AppCache
// status for the URL being served by the |resource_request|.
AppCacheNetworkServiceHandler* network_service_handler =
new AppCacheNetworkServiceHandler(
std::move(resource_request), navigation_handle_core, callback);
network_service_handler->Start();
}
void AppCacheRequestHandler::OnDestructionImminent(AppCacheHost* host) { void AppCacheRequestHandler::OnDestructionImminent(AppCacheHost* host) {
storage()->CancelDelegateCallbacks(this); storage()->CancelDelegateCallbacks(this);
host_ = NULL; // no need to RemoveObserver, the host is being deleted host_ = NULL; // no need to RemoveObserver, the host is being deleted
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "content/browser/appcache/appcache_host.h" #include "content/browser/appcache/appcache_host.h"
#include "content/browser/appcache/appcache_service_impl.h" #include "content/browser/appcache/appcache_service_impl.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "content/common/url_loader_factory.mojom.h"
#include "content/public/common/resource_type.h" #include "content/public/common/resource_type.h"
namespace net { namespace net {
...@@ -26,9 +27,11 @@ class URLRequest; ...@@ -26,9 +27,11 @@ class URLRequest;
namespace content { namespace content {
class AppCacheJob; class AppCacheJob;
class AppCacheNavigationHandleCore;
class AppCacheRequest; class AppCacheRequest;
class AppCacheRequestHandlerTest; class AppCacheRequestHandlerTest;
class AppCacheURLRequestJob; class AppCacheURLRequestJob;
class ResourceContext;
// An instance is created for each net::URLRequest. The instance survives all // An instance is created for each net::URLRequest. The instance survives all
// http transactions involved in the processing of its net::URLRequest, and is // http transactions involved in the processing of its net::URLRequest, and is
...@@ -69,6 +72,20 @@ class CONTENT_EXPORT AppCacheRequestHandler ...@@ -69,6 +72,20 @@ class CONTENT_EXPORT AppCacheRequestHandler
type == RESOURCE_TYPE_SHARED_WORKER; type == RESOURCE_TYPE_SHARED_WORKER;
} }
// PlzNavigate and --enable-network-service.
// Checks whether the |resource_request| can be served out of the AppCache
// and invokes the |callback| accordingly. If the request can be served
// out of the AppCache, we could return a URLLoaderFactory which can serve
// requests out of the AppCache to the callback, or we could create the
// loader right there. At this point we are leaning towards the latter.
static void InitializeForNavigationNetworkService(
std::unique_ptr<ResourceRequest> resource_request,
ResourceContext* resource_context,
AppCacheNavigationHandleCore* navigation_handle_core,
ResourceType resource_type,
base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
std::unique_ptr<ResourceRequest>)> callback);
private: private:
friend class AppCacheHost; friend class AppCacheHost;
......
...@@ -8,25 +8,28 @@ ...@@ -8,25 +8,28 @@
namespace content { namespace content {
// static // static
AppCacheURLLoaderRequest* AppCacheURLLoaderRequest::Create( std::unique_ptr<AppCacheURLLoaderRequest> AppCacheURLLoaderRequest::Create(
const ResourceRequest& request) { std::unique_ptr<ResourceRequest> request) {
return new AppCacheURLLoaderRequest(request); return std::unique_ptr<AppCacheURLLoaderRequest>(
new AppCacheURLLoaderRequest(std::move(request)));
} }
AppCacheURLLoaderRequest::~AppCacheURLLoaderRequest() {}
const GURL& AppCacheURLLoaderRequest::GetURL() const { const GURL& AppCacheURLLoaderRequest::GetURL() const {
return request_.url; return request_->url;
} }
const std::string& AppCacheURLLoaderRequest::GetMethod() const { const std::string& AppCacheURLLoaderRequest::GetMethod() const {
return request_.method; return request_->method;
} }
const GURL& AppCacheURLLoaderRequest::GetFirstPartyForCookies() const { const GURL& AppCacheURLLoaderRequest::GetFirstPartyForCookies() const {
return request_.first_party_for_cookies; return request_->first_party_for_cookies;
} }
const GURL AppCacheURLLoaderRequest::GetReferrer() const { const GURL AppCacheURLLoaderRequest::GetReferrer() const {
return request_.referrer; return request_->referrer;
} }
bool AppCacheURLLoaderRequest::IsSuccess() const { bool AppCacheURLLoaderRequest::IsSuccess() const {
...@@ -51,13 +54,11 @@ std::string AppCacheURLLoaderRequest::GetResponseHeaderByName( ...@@ -51,13 +54,11 @@ std::string AppCacheURLLoaderRequest::GetResponseHeaderByName(
} }
ResourceRequest* AppCacheURLLoaderRequest::GetResourceRequest() { ResourceRequest* AppCacheURLLoaderRequest::GetResourceRequest() {
return &request_; return request_.get();
} }
AppCacheURLLoaderRequest::AppCacheURLLoaderRequest( AppCacheURLLoaderRequest::AppCacheURLLoaderRequest(
const ResourceRequest& request) std::unique_ptr<ResourceRequest> request)
: request_(request) {} : request_(std::move(request)) {}
AppCacheURLLoaderRequest::~AppCacheURLLoaderRequest() {}
} // namespace content } // namespace content
...@@ -16,7 +16,10 @@ class CONTENT_EXPORT AppCacheURLLoaderRequest : public AppCacheRequest { ...@@ -16,7 +16,10 @@ class CONTENT_EXPORT AppCacheURLLoaderRequest : public AppCacheRequest {
public: public:
// Factory function to create an instance of the AppCacheResourceRequest // Factory function to create an instance of the AppCacheResourceRequest
// class. // class.
static AppCacheURLLoaderRequest* Create(const ResourceRequest& request); static std::unique_ptr<AppCacheURLLoaderRequest> Create(
std::unique_ptr<ResourceRequest> request);
~AppCacheURLLoaderRequest() override;
// AppCacheRequest overrides. // AppCacheRequest overrides.
// TODO(ananta) // TODO(ananta)
...@@ -39,11 +42,10 @@ class CONTENT_EXPORT AppCacheURLLoaderRequest : public AppCacheRequest { ...@@ -39,11 +42,10 @@ class CONTENT_EXPORT AppCacheURLLoaderRequest : public AppCacheRequest {
ResourceRequest* GetResourceRequest() override; ResourceRequest* GetResourceRequest() override;
protected: protected:
explicit AppCacheURLLoaderRequest(const ResourceRequest& request); explicit AppCacheURLLoaderRequest(std::unique_ptr<ResourceRequest> request);
~AppCacheURLLoaderRequest() override;
private: private:
ResourceRequest request_; std::unique_ptr<ResourceRequest> request_;
DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoaderRequest); DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoaderRequest);
}; };
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "content/browser/appcache/appcache_navigation_handle.h"
#include "content/browser/appcache/appcache_navigation_handle_core.h"
#include "content/browser/appcache/appcache_request_handler.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h" #include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/frame_host/frame_tree_node.h" #include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigation_request_info.h" #include "content/browser/frame_host/navigation_request_info.h"
...@@ -38,21 +41,35 @@ namespace { ...@@ -38,21 +41,35 @@ namespace {
static base::LazyInstance<mojom::URLLoaderFactoryPtr>::Leaky static base::LazyInstance<mojom::URLLoaderFactoryPtr>::Leaky
g_url_loader_factory = LAZY_INSTANCE_INITIALIZER; g_url_loader_factory = LAZY_INSTANCE_INITIALIZER;
// This function is called on the IO thread for POST/PUT requests for using CompleteNavigationStartCallback =
// attaching blob information to the request body. base::Callback<void(mojom::URLLoaderFactoryPtrInfo,
void HandleRequestsWithBody( std::unique_ptr<ResourceRequest>)>;
std::unique_ptr<ResourceRequest> request,
void PrepareNavigationOnIOThread(
std::unique_ptr<ResourceRequest> resource_request,
ResourceContext* resource_context, ResourceContext* resource_context,
base::WeakPtr<NavigationURLLoaderNetworkService> url_loader) { ResourceType resource_type,
DCHECK_CURRENTLY_ON(BrowserThread::IO); AppCacheNavigationHandleCore* appcache_handle_core,
DCHECK(request->request_body.get()); CompleteNavigationStartCallback complete_request) {
if (resource_request->request_body.get()) {
AttachRequestBodyBlobDataHandles(resource_request->request_body.get(),
resource_context);
}
mojom::URLLoaderFactoryPtrInfo url_loader_factory_ptr_info;
if (appcache_handle_core) {
AppCacheRequestHandler::InitializeForNavigationNetworkService(
std::move(resource_request), resource_context, appcache_handle_core,
resource_type, complete_request);
return;
}
AttachRequestBodyBlobDataHandles(request->request_body.get(),
resource_context);
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
base::Bind(&NavigationURLLoaderNetworkService::StartURLRequest, base::Bind(complete_request,
url_loader, base::Passed(&request))); base::Passed(std::move(url_loader_factory_ptr_info)),
base::Passed(std::move(resource_request))));
} }
} // namespace } // namespace
...@@ -105,19 +122,24 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService( ...@@ -105,19 +122,24 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService(
new_request->load_flags = load_flags; new_request->load_flags = load_flags;
new_request->request_body = request_info_->common_params.post_data.get(); new_request->request_body = request_info_->common_params.post_data.get();
if (new_request->request_body.get()) {
// The request body may need blob handles to be added to it. This // AppCache or post data needs some handling on the IO thread.
// functionality has to be invoked on the IO thread. // The request body may need blob handles to be added to it. This
// functionality has to be invoked on the IO thread.
if (/*appcache_handle || */ new_request->request_body.get()) {
ResourceType resource_type = request_info_->is_main_frame
? RESOURCE_TYPE_MAIN_FRAME
: RESOURCE_TYPE_SUB_FRAME;
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::Bind(&HandleRequestsWithBody, base::Bind(
base::Passed(&new_request), &PrepareNavigationOnIOThread, base::Passed(std::move(new_request)),
resource_context, resource_context, resource_type, appcache_handle->core(),
weak_factory_.GetWeakPtr())); base::Bind(&NavigationURLLoaderNetworkService::StartURLRequest,
weak_factory_.GetWeakPtr())));
return; return;
} }
StartURLRequest(mojom::URLLoaderFactoryPtrInfo(), std::move(new_request));
StartURLRequest(std::move(new_request));
} }
NavigationURLLoaderNetworkService::~NavigationURLLoaderNetworkService() {} NavigationURLLoaderNetworkService::~NavigationURLLoaderNetworkService() {}
...@@ -200,9 +222,14 @@ void NavigationURLLoaderNetworkService::OnComplete( ...@@ -200,9 +222,14 @@ void NavigationURLLoaderNetworkService::OnComplete(
} }
void NavigationURLLoaderNetworkService::StartURLRequest( void NavigationURLLoaderNetworkService::StartURLRequest(
mojom::URLLoaderFactoryPtrInfo url_loader_factory_info,
std::unique_ptr<ResourceRequest> request) { std::unique_ptr<ResourceRequest> request) {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Bind the URLClient implementation to this object to pass to the URLLoader.
if (binding_.is_bound())
binding_.Unbind();
mojom::URLLoaderClientPtr url_loader_client_ptr_to_pass; mojom::URLLoaderClientPtr url_loader_client_ptr_to_pass;
binding_.Bind(&url_loader_client_ptr_to_pass); binding_.Bind(&url_loader_client_ptr_to_pass);
...@@ -224,8 +251,16 @@ void NavigationURLLoaderNetworkService::StartURLRequest( ...@@ -224,8 +251,16 @@ void NavigationURLLoaderNetworkService::StartURLRequest(
factory = factory_ptr.get(); factory = factory_ptr.get();
} }
if (!factory) if (!factory) {
factory = GetURLLoaderFactory(); // If a URLLoaderFactory was provided, then we use that one, otherwise
// fall back to connecting directly to the network service.
if (url_loader_factory_info.is_valid()) {
url_loader_factory_.Bind(std::move(url_loader_factory_info));
factory = url_loader_factory_.get();
} else {
factory = GetURLLoaderFactory();
}
}
factory->CreateLoaderAndStart(mojo::MakeRequest(&url_loader_associated_ptr_), factory->CreateLoaderAndStart(mojo::MakeRequest(&url_loader_associated_ptr_),
0 /* routing_id? */, 0 /* request_id? */, 0 /* routing_id? */, 0 /* request_id? */,
......
...@@ -67,7 +67,8 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader, ...@@ -67,7 +67,8 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader,
const ResourceRequestCompletionStatus& completion_status) override; const ResourceRequestCompletionStatus& completion_status) override;
// Initiates the request. // Initiates the request.
void StartURLRequest(std::unique_ptr<ResourceRequest> request); void StartURLRequest(mojom::URLLoaderFactoryPtrInfo url_loader_factory_info,
std::unique_ptr<ResourceRequest> request);
private: private:
void ConnectURLLoaderFactory( void ConnectURLLoaderFactory(
...@@ -77,6 +78,7 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader, ...@@ -77,6 +78,7 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader,
NavigationURLLoaderDelegate* delegate_; NavigationURLLoaderDelegate* delegate_;
mojom::URLLoaderFactoryPtr url_loader_factory_;
mojo::Binding<mojom::URLLoaderClient> binding_; mojo::Binding<mojom::URLLoaderClient> binding_;
std::unique_ptr<NavigationRequestInfo> request_info_; std::unique_ptr<NavigationRequestInfo> request_info_;
mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_;
......
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