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

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

Issue 2518523003: Limit timeout for foreign fetch events when triggered by another service worker. (Closed)
Patch Set: don't intercept worker main resource fetches Created 4 years 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
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/foreign_fetch_request_handler.h
diff --git a/content/browser/service_worker/foreign_fetch_request_handler.h b/content/browser/service_worker/foreign_fetch_request_handler.h
index 48cb85e3960c0703c13a6dd939707ad2f64160f2..c047dc37c7ec2757b96ca8abe4149f931b0eaea7 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler.h
+++ b/content/browser/service_worker/foreign_fetch_request_handler.h
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/optional.h"
#include "base/supports_user_data.h"
#include "base/time/time.h"
#include "content/browser/service_worker/service_worker_url_request_job.h"
@@ -94,7 +95,8 @@ class CONTENT_EXPORT ForeignFetchRequestHandler
ResourceType resource_type,
RequestContextType request_context_type,
RequestContextFrameType frame_type,
- scoped_refptr<ResourceRequestBodyImpl> body);
+ scoped_refptr<ResourceRequestBodyImpl> body,
+ const base::Optional<base::TimeDelta>& timeout);
// Called when a ServiceWorkerRegistration has (or hasn't) been found for the
// request being handled.
@@ -128,6 +130,7 @@ class CONTENT_EXPORT ForeignFetchRequestHandler
RequestContextFrameType frame_type_;
scoped_refptr<ResourceRequestBodyImpl> body_;
ResourceContext* resource_context_;
+ base::Optional<base::TimeDelta> timeout_;
base::WeakPtr<ServiceWorkerURLRequestJob> job_;
scoped_refptr<ServiceWorkerVersion> target_worker_;
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698