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

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

Issue 2956373002: Add support for subresource request loads in AppCache for the network service. (Closed)
Patch Set: Moved the SubresourceLoadInfo structure to the appcache_url_loader_job.h/.cc files. Created 3 years, 6 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_subresource_url_factory.h
diff --git a/content/browser/appcache/appcache_subresource_url_factory.h b/content/browser/appcache/appcache_subresource_url_factory.h
index f55afc472f0c375a4f2e6edb4e4c03d63b98ea09..0e59b0a77d2bf56600cda22f02ea97ae59bcf9dc 100644
--- a/content/browser/appcache/appcache_subresource_url_factory.h
+++ b/content/browser/appcache/appcache_subresource_url_factory.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_APPCACHE_APPCACHE_SUBRESOURCE_URL_FACTORY_H_
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "content/common/url_loader_factory.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
@@ -13,6 +14,7 @@
namespace content {
+class AppCacheHost;
class AppCacheJob;
class AppCacheServiceImpl;
class URLLoaderFactoryGetter;
@@ -25,10 +27,16 @@ class AppCacheSubresourceURLFactory : public mojom::URLLoaderFactory {
// Factory function to create an instance of the factory.
// 1. The |factory_getter| parameter is used to query the network service
// to pass network requests to.
+ // 2. The |frame_tree_node_id| parameter contains the FrameTreeNodeId for the
kinuko 2017/07/03 06:34:15 Do you mean to mention |host| in the latest patch
ananta 2017/07/03 07:36:47 Done.
+ // frame.
+ // Returns the AppCacheSubresourceURLFactory instance. The URLLoaderFactoryPtr
+ // is returned in the |loader_factory| parameter.
// Returns a URLLoaderFactoryPtr instance which controls the lifetime of the
// factory.
- static mojom::URLLoaderFactoryPtr CreateURLLoaderFactory(
- URLLoaderFactoryGetter* factory_getter);
+ static AppCacheSubresourceURLFactory* CreateURLLoaderFactory(
+ URLLoaderFactoryGetter* factory_getter,
+ base::WeakPtr<AppCacheHost> host,
+ mojom::URLLoaderFactoryPtr* loader_factory);
// mojom::URLLoaderFactory implementation.
void CreateLoaderAndStart(
@@ -47,7 +55,8 @@ class AppCacheSubresourceURLFactory : public mojom::URLLoaderFactory {
private:
AppCacheSubresourceURLFactory(mojom::URLLoaderFactoryRequest request,
- URLLoaderFactoryGetter* factory_getter);
+ URLLoaderFactoryGetter* factory_getter,
+ base::WeakPtr<AppCacheHost> host);
void OnConnectionError();
@@ -58,6 +67,8 @@ class AppCacheSubresourceURLFactory : public mojom::URLLoaderFactory {
// the network service.
scoped_refptr<URLLoaderFactoryGetter> default_url_loader_factory_getter_;
+ base::WeakPtr<AppCacheHost> appcache_host_;
+
DISALLOW_COPY_AND_ASSIGN(AppCacheSubresourceURLFactory);
};

Powered by Google App Engine
This is Rietveld 408576698