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

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

Issue 2874663004: Provide skeleton functionality for AppCache handling in the network service. (Closed)
Patch Set: Disable posting to the IO thread if appcache is enabled in the n/w service code Created 3 years, 7 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 3b7e16736d50b3198620f2e4367daa3bce0686e3..0e3450f2881ffc61b1fc61c5c23a1ec07b468300 100644
--- a/content/browser/appcache/appcache_request_handler.h
+++ b/content/browser/appcache/appcache_request_handler.h
@@ -17,6 +17,7 @@
#include "content/browser/appcache/appcache_host.h"
#include "content/browser/appcache/appcache_service_impl.h"
#include "content/common/content_export.h"
+#include "content/common/url_loader_factory.mojom.h"
#include "content/public/common/resource_type.h"
namespace net {
@@ -26,9 +27,11 @@ class URLRequest;
namespace content {
class AppCacheJob;
+class AppCacheNavigationHandleCore;
class AppCacheRequest;
class AppCacheRequestHandlerTest;
class AppCacheURLRequestJob;
+class ResourceContext;
// An instance is created for each net::URLRequest. The instance survives all
// http transactions involved in the processing of its net::URLRequest, and is
@@ -69,6 +72,20 @@ class CONTENT_EXPORT AppCacheRequestHandler
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:
friend class AppCacheHost;
« no previous file with comments | « content/browser/appcache/appcache_network_service_handler.cc ('k') | content/browser/appcache/appcache_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698