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

Unified Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 2881073003: Support DataSaver for SharedWorker (Closed)
Patch Set: fix #include "public/web/WebDataSaverFlag.h" 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: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index 91c1f35dc372283ba2e9e00c762ff37719f78c61..6e1c179e80c85680c2f57ce4225bff42173bb7ee 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -292,7 +292,7 @@ void WebEmbeddedWorkerImpl::PrepareShadowPageForLoader() {
// restriction.
settings->SetStrictMixedContentChecking(true);
settings->SetAllowRunningOfInsecureContent(false);
- settings->SetDataSaverEnabled(worker_start_data_.data_saver_enabled);
+ settings->SetDataSaverFlag(worker_start_data_.data_saver_flag);
main_frame_ = ToWebLocalFrameBase(WebLocalFrame::Create(
WebTreeScopeType::kDocument, this, nullptr, nullptr));
web_view_->SetMainFrame(main_frame_.Get());
@@ -431,8 +431,8 @@ void WebEmbeddedWorkerImpl::StartWorkerThread() {
std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
worker_context_client_->CreateServiceWorkerFetchContext();
DCHECK(web_worker_fetch_context);
- web_worker_fetch_context->SetDataSaverEnabled(
- document->GetFrame()->GetSettings()->GetDataSaverEnabled());
+ web_worker_fetch_context->SetDataSaverFlag(
+ document->GetFrame()->GetSettings()->GetDataSaverFlag());
ProvideWorkerFetchContextToWorker(worker_clients,
std::move(web_worker_fetch_context));
}

Powered by Google App Engine
This is Rietveld 408576698