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

Unified Diff: content/browser/service_worker/service_worker_url_request_job.h

Issue 2410333006: Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(). (Closed)
Patch Set: add comment about switch Created 4 years, 2 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/service_worker/service_worker_url_request_job.h
diff --git a/content/browser/service_worker/service_worker_url_request_job.h b/content/browser/service_worker/service_worker_url_request_job.h
index 278f250a2ad32685f7a7027e0bb94423486229a3..8129fa916f4df14477d330454a5c6f92fb0ff6dc 100644
--- a/content/browser/service_worker/service_worker_url_request_job.h
+++ b/content/browser/service_worker/service_worker_url_request_job.h
@@ -11,6 +11,7 @@
#include <memory>
#include <string>
+#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -23,6 +24,7 @@
#include "content/public/common/request_context_frame_type.h"
#include "content/public/common/request_context_type.h"
#include "content/public/common/resource_type.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
#include "net/http/http_byte_range.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job.h"
@@ -33,15 +35,19 @@
namespace net {
class IOBuffer;
-}
+} // namespace net
namespace storage {
class BlobDataHandle;
class BlobStorageContext;
-}
+} // namespace storage
namespace content {
+namespace mojom {
+class URLLoaderFactory;
+} // namespace mojom
+
class ResourceContext;
class ResourceRequestBodyImpl;
class ServiceWorkerBlobReader;
@@ -54,6 +60,9 @@ class Stream;
class CONTENT_EXPORT ServiceWorkerURLRequestJob : public net::URLRequestJob {
public:
+ using URLLoaderFactoryCallback =
+ base::Callback<bool(mojo::InterfaceRequest<mojom::URLLoaderFactory>)>;
+
class CONTENT_EXPORT Delegate {
public:
virtual ~Delegate() {}
@@ -95,6 +104,7 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob : public net::URLRequestJob {
RequestContextFrameType frame_type,
scoped_refptr<ResourceRequestBodyImpl> body,
ServiceWorkerFetchType fetch_type,
+ const URLLoaderFactoryCallback& url_loader_factory_callback,
Delegate* delegate);
~ServiceWorkerURLRequestJob() override;
@@ -284,6 +294,7 @@ class CONTENT_EXPORT ServiceWorkerURLRequestJob : public net::URLRequestJob {
bool worker_already_activated_ = false;
EmbeddedWorkerStatus initial_worker_status_ = EmbeddedWorkerStatus::STOPPED;
+ const URLLoaderFactoryCallback url_loader_factory_callback_;
base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);

Powered by Google App Engine
This is Rietveld 408576698