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

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

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: content/renderer/service_worker/service_worker_fetch_context_impl.h
diff --git a/content/renderer/service_worker/service_worker_fetch_context_impl.h b/content/renderer/service_worker/service_worker_fetch_context_impl.h
index 17309251d46fdc8ac728723e059cb6933b6b5462..9577e729205020b3f06b444b55e2f6ce57a7313b 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.h
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.h
@@ -7,6 +7,7 @@
#include "content/common/worker_url_loader_factory_provider.mojom.h"
#include "third_party/WebKit/public/platform/WebWorkerFetchContext.h"
+#include "third_party/WebKit/public/web/WebDataSaverFlag.h"
namespace base {
class SingleThreadTaskRunner;
@@ -27,8 +28,8 @@ class ServiceWorkerFetchContextImpl : public blink::WebWorkerFetchContext {
std::unique_ptr<blink::WebURLLoader> CreateURLLoader() override;
void WillSendRequest(blink::WebURLRequest&) override;
bool IsControlledByServiceWorker() const override;
- void SetDataSaverEnabled(bool enabled) override;
- bool IsDataSaverEnabled() const override;
+ void SetDataSaverFlag(blink::WebDataSaverFlag) override;
+ blink::WebDataSaverFlag DataSaverFlag() const override;
private:
mojom::WorkerURLLoaderFactoryProviderPtrInfo provider_info_;
@@ -39,7 +40,7 @@ class ServiceWorkerFetchContextImpl : public blink::WebWorkerFetchContext {
mojom::WorkerURLLoaderFactoryProviderPtr provider_;
mojom::URLLoaderFactoryAssociatedPtr url_loader_factory_;
- bool is_data_saver_enabled_ = false;
+ blink::WebDataSaverFlag data_saver_flag_ = blink::WebDataSaverFlag::kDisabled;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698