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

Unified Diff: third_party/WebKit/Source/core/testing/InternalSettings.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/core/testing/InternalSettings.cpp
diff --git a/third_party/WebKit/Source/core/testing/InternalSettings.cpp b/third_party/WebKit/Source/core/testing/InternalSettings.cpp
index 18e7c466f874d790b8e323ec47c9af0b2c864c2d..09664830c7cd1ee8a53b35df82a25e1b8ab85fe1 100644
--- a/third_party/WebKit/Source/core/testing/InternalSettings.cpp
+++ b/third_party/WebKit/Source/core/testing/InternalSettings.cpp
@@ -553,4 +553,11 @@ void InternalSettings::setAutoplayPolicy(const String& policy_str,
GetSettings()->SetAutoplayPolicy(policy);
}
+void InternalSettings::setDataSaverEnabled(bool enabled,
+ ExceptionState& exception_state) {
+ InternalSettingsGuardForSettings();
+ GetSettings()->SetDataSaverFlag(enabled ? WebDataSaverFlag::kEnabled
+ : WebDataSaverFlag::kDisabled);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698