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

Unified Diff: content/renderer/service_worker/worker_fetch_context_impl.h

Issue 2890723002: Set the requester context info to the requests for off-main-thread-fetch. (Closed)
Patch Set: rebase and s/Set/Sets/ 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/service_worker/worker_fetch_context_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/worker_fetch_context_impl.h
diff --git a/content/renderer/service_worker/worker_fetch_context_impl.h b/content/renderer/service_worker/worker_fetch_context_impl.h
index a99823f7bc7da20e9875e098227f0d01031f78ff..175ead6553e1b64be5b55b07a49fa967e257e3c4 100644
--- a/content/renderer/service_worker/worker_fetch_context_impl.h
+++ b/content/renderer/service_worker/worker_fetch_context_impl.h
@@ -20,6 +20,11 @@ namespace content {
class ResourceDispatcher;
+// This class is used while fetching resource requests on workers (dedicated
+// worker and shared worker) when off-main-thread-fetch is enabled. This class
+// is created on the main thread and passed to the worker thread.
+// This class is not used for service workers. For service workers,
+// ServiceWorkerFetchContextImpl class is used instead.
class WorkerFetchContextImpl : public blink::WebWorkerFetchContext,
public mojom::ServiceWorkerWorkerClient {
public:
@@ -39,12 +44,16 @@ class WorkerFetchContextImpl : public blink::WebWorkerFetchContext,
// mojom::ServiceWorkerWorkerClient implementation:
void SetControllerServiceWorker(int64_t controller_version_id) override;
- // Sets the fetch context status of the parent frame.
+ // Sets the fetch context status copied from the frame; the parent frame for a
+ // dedicated worker, the main frame of the shadow page for a shared worker.
void set_service_worker_provider_id(int id);
void set_is_controlled_by_service_worker(bool flag);
void set_parent_frame_id(int id);
void set_first_party_for_cookies(
const blink::WebURL& first_party_for_cookies);
+ // Sets whether the worker context is a secure context.
+ // https://w3c.github.io/webappsec-secure-contexts/
+ void set_is_secure_context(bool flag);
private:
mojom::WorkerURLLoaderFactoryProviderPtrInfo provider_info_;
@@ -65,6 +74,7 @@ class WorkerFetchContextImpl : public blink::WebWorkerFetchContext,
bool is_data_saver_enabled_ = false;
int parent_frame_id_ = MSG_ROUTING_NONE;
GURL first_party_for_cookies_;
+ bool is_secure_context_ = false;
};
} // namespace content
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/service_worker/worker_fetch_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698