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

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

Issue 2874663004: Provide skeleton functionality for AppCache handling in the network service. (Closed)
Patch Set: 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.cc
diff --git a/content/browser/appcache/appcache_request_handler.cc b/content/browser/appcache/appcache_request_handler.cc
index 870fa7d35200c73a52989a24241190d1cd360aa3..3b34b5ac1d6929657aeb01395ca90d795237f89c 100644
--- a/content/browser/appcache/appcache_request_handler.cc
+++ b/content/browser/appcache/appcache_request_handler.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "content/browser/appcache/appcache.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_request.h"
#include "content/browser/appcache/appcache_url_request_job.h"
@@ -223,6 +224,24 @@ void AppCacheRequestHandler::MaybeCompleteCrossSiteTransferInOldProcess(
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), resource_context, navigation_handle_core,
+ resource_type, callback);
+ network_service_handler->Start();
+}
+
void AppCacheRequestHandler::OnDestructionImminent(AppCacheHost* host) {
storage()->CancelDelegateCallbacks(this);
host_ = NULL; // no need to RemoveObserver, the host is being deleted

Powered by Google App Engine
This is Rietveld 408576698