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

Unified Diff: content/browser/shared_worker/shared_worker_instance.cc

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: same as PS6 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/shared_worker/shared_worker_instance.cc
diff --git a/content/browser/shared_worker/shared_worker_instance.cc b/content/browser/shared_worker/shared_worker_instance.cc
index 83a631cd5da8343faf30303081f529361d9a33d4..7d956e7f2567fc137878d4b862393a266e21f882 100644
--- a/content/browser/shared_worker/shared_worker_instance.cc
+++ b/content/browser/shared_worker/shared_worker_instance.cc
@@ -16,7 +16,8 @@ SharedWorkerInstance::SharedWorkerInstance(
blink::WebAddressSpace creation_address_space,
ResourceContext* resource_context,
const WorkerStoragePartitionId& partition_id,
- blink::WebSharedWorkerCreationContextType creation_context_type)
+ blink::WebSharedWorkerCreationContextType creation_context_type,
+ bool data_saver_enabled)
: url_(url),
name_(name),
content_security_policy_(content_security_policy),
@@ -24,7 +25,8 @@ SharedWorkerInstance::SharedWorkerInstance(
creation_address_space_(creation_address_space),
resource_context_(resource_context),
partition_id_(partition_id),
- creation_context_type_(creation_context_type) {
+ creation_context_type_(creation_context_type),
+ data_saver_enabled_(data_saver_enabled) {
DCHECK(resource_context_);
}
@@ -36,7 +38,8 @@ SharedWorkerInstance::SharedWorkerInstance(const SharedWorkerInstance& other)
creation_address_space_(other.creation_address_space_),
resource_context_(other.resource_context_),
partition_id_(other.partition_id_),
- creation_context_type_(other.creation_context_type_) {}
+ creation_context_type_(other.creation_context_type_),
+ data_saver_enabled_(other.data_saver_enabled_) {}
SharedWorkerInstance::~SharedWorkerInstance() {}

Powered by Google App Engine
This is Rietveld 408576698