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

Unified Diff: Source/core/fetch/ClientHintsPreferences.h

Issue 1287783003: Make ClientHintsPreferences class work like a class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/fetch/ClientHintsPreferences.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ClientHintsPreferences.h
diff --git a/Source/core/fetch/ClientHintsPreferences.h b/Source/core/fetch/ClientHintsPreferences.h
index 692e960bcd2c0e22603675f031e60b0733e62c96..e8ff58676153776c538a3bedae99a49ec62d251b 100644
--- a/Source/core/fetch/ClientHintsPreferences.h
+++ b/Source/core/fetch/ClientHintsPreferences.h
@@ -12,28 +12,21 @@ namespace blink {
class ResourceFetcher;
-class ClientHintsPreferences {
+class CORE_EXPORT ClientHintsPreferences {
public:
- ClientHintsPreferences()
- : m_shouldSendDPR(false)
- , m_shouldSendResourceWidth(false)
- , m_shouldSendViewportWidth(false)
- {
- }
-
- void set(const ClientHintsPreferences& other)
- {
- m_shouldSendDPR = other.m_shouldSendDPR;
- m_shouldSendResourceWidth = other.m_shouldSendResourceWidth;
- m_shouldSendViewportWidth = other.m_shouldSendViewportWidth;
- }
+ ClientHintsPreferences();
+
+ void updateFrom(const ClientHintsPreferences&);
+ void updateFromAcceptClientHintsHeader(const String& headerValue, ResourceFetcher*);
- void setShouldSendDPR(bool should) { m_shouldSendDPR = should; }
- void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = should; }
- void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = should; }
bool shouldSendDPR() const { return m_shouldSendDPR; }
+ void setShouldSendDPR(bool should) { m_shouldSendDPR = should; }
+
bool shouldSendResourceWidth() const { return m_shouldSendResourceWidth; }
+ void setShouldSendResourceWidth(bool should) { m_shouldSendResourceWidth = should; }
+
bool shouldSendViewportWidth() const { return m_shouldSendViewportWidth; }
+ void setShouldSendViewportWidth(bool should) { m_shouldSendViewportWidth = should; }
private:
bool m_shouldSendDPR;
@@ -41,7 +34,6 @@ private:
bool m_shouldSendViewportWidth;
};
-CORE_EXPORT void handleAcceptClientHintsHeader(const String& headerValue, ClientHintsPreferences&, ResourceFetcher*);
} // namespace blink
-#endif
+#endif
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/fetch/ClientHintsPreferences.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698