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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h

Issue 2860093003: Implement device-ram client hints header (Closed)
Patch Set: Minor fixes 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/platform/loader/fetch/ClientHintsPreferences.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h b/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
index a25e21800c8622c6f90d00d8f1d599112482bf9f..3de29e0f4617f3d1d5eaa584f7f225e4861dcda0 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
@@ -17,6 +17,7 @@ class PLATFORM_EXPORT ClientHintsPreferences {
public:
class Context {
public:
+ virtual void CountClientHintsDeviceRAM() = 0;
virtual void CountClientHintsDPR() = 0;
virtual void CountClientHintsResourceWidth() = 0;
virtual void CountClientHintsViewportWidth() = 0;
@@ -30,6 +31,9 @@ class PLATFORM_EXPORT ClientHintsPreferences {
void UpdateFrom(const ClientHintsPreferences&);
void UpdateFromAcceptClientHintsHeader(const String& header_value, Context*);
+ bool ShouldSendDeviceRAM() const { return should_send_device_ram_; }
+ void SetShouldSendDeviceRAM(bool should) { should_send_device_ram_ = should; }
+
bool ShouldSendDPR() const { return should_send_dpr_; }
void SetShouldSendDPR(bool should) { should_send_dpr_ = should; }
@@ -44,6 +48,7 @@ class PLATFORM_EXPORT ClientHintsPreferences {
}
private:
+ bool should_send_device_ram_;
bool should_send_dpr_;
bool should_send_resource_width_;
bool should_send_viewport_width_;

Powered by Google App Engine
This is Rietveld 408576698