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

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

Issue 1914593002: Limit requests for which link headers can install service workers to secure contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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/service_worker/service_worker_request_handler.h
diff --git a/content/browser/service_worker/service_worker_request_handler.h b/content/browser/service_worker/service_worker_request_handler.h
index f3e06502b246d4d7df012684308a70d846f6e70a..56cb4f476acc7a0041968d7fb6c54c07044cf6f7 100644
--- a/content/browser/service_worker/service_worker_request_handler.h
+++ b/content/browser/service_worker/service_worker_request_handler.h
@@ -81,7 +81,7 @@ class CONTENT_EXPORT ServiceWorkerRequestHandler
// Returns the handler attached to |request|. This may return NULL
// if no handler is attached.
static ServiceWorkerRequestHandler* GetHandler(
- net::URLRequest* request);
+ const net::URLRequest* request);
// Creates a protocol interceptor for ServiceWorker.
static std::unique_ptr<net::URLRequestInterceptor> CreateInterceptor(
@@ -91,7 +91,12 @@ class CONTENT_EXPORT ServiceWorkerRequestHandler
// It's only reliable after the ServiceWorkerRequestHandler MaybeCreateJob
// method runs to completion for this request. The AppCache handler uses
// this to avoid colliding with ServiceWorkers.
- static bool IsControlledByServiceWorker(net::URLRequest* request);
+ static bool IsControlledByServiceWorker(const net::URLRequest* request);
+
+ // Returns the ServiceWorkerProviderHost the request is associated with.
+ // Only valid after InitializeHandler has been called. Can return null.
+ static ServiceWorkerProviderHost* GetProviderHost(
+ const net::URLRequest* request);
~ServiceWorkerRequestHandler() override;

Powered by Google App Engine
This is Rietveld 408576698