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

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

Issue 2807533003: [WIP2] off-main-thread loading
Patch Set: call set_is_secure_context in EmbeddedSharedWorkerStub::CreateWorkerFetchContext() Created 3 years, 8 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/DedicatedWorkerMessagingProxyProviderImpl.cpp
diff --git a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
index 8dbb41a1a933080b5eddaa5d70644bd9e4d7b58c..1e486c4250448718972105f9ded4c2434289bca8 100644
--- a/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
+++ b/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
@@ -31,12 +31,14 @@
#include "web/DedicatedWorkerMessagingProxyProviderImpl.h"
#include "core/dom/Document.h"
+#include "core/frame/Settings.h"
#include "core/loader/WorkerFetchContext.h"
#include "core/workers/DedicatedWorkerMessagingProxy.h"
#include "core/workers/Worker.h"
#include "core/workers/WorkerClients.h"
#include "core/workers/WorkerContentSettingsClient.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h"
#include "public/platform/WebContentSettingsClient.h"
@@ -74,8 +76,12 @@ DedicatedWorkerMessagingProxyProviderImpl::CreateWorkerMessagingProxy(
std::unique_ptr<WebWorkerFetchContext> web_worker_fetch_context =
web_frame->Client()->CreateWorkerFetchContext();
DCHECK(web_worker_fetch_context);
- // TODO(horo): Set more information about the context (ex:
- // DataSaverEnabled) to |web_worker_fetch_context|.
+
+ web_worker_fetch_context->SetAppCacheHostID(
+ document->Fetcher()->Context().ApplicationCacheHostID());
+
+ web_worker_fetch_context->SetDataSaverEnabled(
+ document->GetFrame()->GetSettings()->GetDataSaverEnabled());
ProvideWorkerFetchContextToWorker(worker_clients,
std::move(web_worker_fetch_context));
}

Powered by Google App Engine
This is Rietveld 408576698