Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(901)

Unified Diff: content/browser/appcache/appcache_request_handler.h

Issue 2956373002: Add support for subresource request loads in AppCache for the network service. (Closed)
Patch Set: Address review comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/appcache/appcache_request_handler.h
diff --git a/content/browser/appcache/appcache_request_handler.h b/content/browser/appcache/appcache_request_handler.h
index 9fa39391b554398ad6926e52e70514e9f6045044..da797b9219f542aed3d4bf75ec438b06f6bd3638 100644
--- a/content/browser/appcache/appcache_request_handler.h
+++ b/content/browser/appcache/appcache_request_handler.h
@@ -32,7 +32,8 @@ class AppCacheNavigationHandleCore;
class AppCacheRequest;
class AppCacheRequestHandlerTest;
class AppCacheURLRequestJob;
-struct ResourceRequest;
+class AppCacheHost;
+struct SubresourceLoadInfo;
// An instance is created for each net::URLRequest. The instance survives all
// http transactions involved in the processing of its net::URLRequest, and is
@@ -80,6 +81,15 @@ class CONTENT_EXPORT AppCacheRequestHandler
AppCacheNavigationHandleCore* appcache_handle_core,
URLLoaderFactoryGetter* url_loader_factory_getter);
+ // The following setters only apply for the network service code.
+ void set_network_url_loader_factory_getter(
+ URLLoaderFactoryGetter* url_loader_factory_getter) {
+ network_url_loader_factory_getter_ = url_loader_factory_getter;
+ }
+
+ void SetSubresourceRequestLoadInfo(
+ std::unique_ptr<SubresourceLoadInfo> subresource_load_info);
+
private:
friend class AppCacheHost;
@@ -152,11 +162,6 @@ class CONTENT_EXPORT AppCacheRequestHandler
LoaderCallback callback) override;
mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory() override;
- void set_network_url_loader_factory_getter(
- URLLoaderFactoryGetter* url_loader_factory_getter) {
- network_url_loader_factory_getter_ = url_loader_factory_getter;
- }
-
// Data members -----------------------------------------------
// What host we're servicing a request for.
@@ -217,6 +222,8 @@ class CONTENT_EXPORT AppCacheRequestHandler
std::unique_ptr<AppCacheRequest> request_;
+ // Network service related members.
+
// In the network service world we are queried via the URLLoaderRequestHandler
// interface to see if the navigation request can be handled via the
// AppCache. We hold onto the AppCache job created here until the client
@@ -230,6 +237,13 @@ class CONTENT_EXPORT AppCacheRequestHandler
friend class content::AppCacheRequestHandlerTest;
+ // Subresource load information.
+ std::unique_ptr<SubresourceLoadInfo> subresource_load_info_;
+
+ // The AppCache host instance. We pass this to the
+ // AppCacheSubresourceURLFactory instance on creation.
+ base::WeakPtr<AppCacheHost> appcache_host_;
+
DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler);
};

Powered by Google App Engine
This is Rietveld 408576698