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

Unified Diff: third_party/WebKit/Source/core/fetch/ClientHintsPreferences.cpp

Issue 2544933003: Split methods for ClientHintsPreferences from FrameFetchContext (Closed)
Patch Set: Rebase Created 4 years 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/fetch/ClientHintsPreferences.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ClientHintsPreferences.cpp b/third_party/WebKit/Source/core/fetch/ClientHintsPreferences.cpp
index 4b5e7d92fe4a69f85883baebb3b81b9b69fecbd2..5b0c4f4283127afa81d6e71a84934ed173c70bbf 100644
--- a/third_party/WebKit/Source/core/fetch/ClientHintsPreferences.cpp
+++ b/third_party/WebKit/Source/core/fetch/ClientHintsPreferences.cpp
@@ -4,7 +4,6 @@
#include "core/fetch/ClientHintsPreferences.h"
-#include "core/fetch/ResourceFetcher.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/network/HTTPParsers.h"
@@ -24,27 +23,27 @@ void ClientHintsPreferences::updateFrom(
void ClientHintsPreferences::updateFromAcceptClientHintsHeader(
const String& headerValue,
- ResourceFetcher* fetcher) {
+ Context* context) {
if (!RuntimeEnabledFeatures::clientHintsEnabled() || headerValue.isEmpty())
return;
CommaDelimitedHeaderSet acceptClientHintsHeader;
parseCommaDelimitedHeader(headerValue, acceptClientHintsHeader);
if (acceptClientHintsHeader.contains("dpr")) {
- if (fetcher)
- fetcher->context().countClientHintsDPR();
+ if (context)
+ context->countClientHintsDPR();
m_shouldSendDPR = true;
}
if (acceptClientHintsHeader.contains("width")) {
- if (fetcher)
- fetcher->context().countClientHintsResourceWidth();
+ if (context)
+ context->countClientHintsResourceWidth();
m_shouldSendResourceWidth = true;
}
if (acceptClientHintsHeader.contains("viewport-width")) {
- if (fetcher)
- fetcher->context().countClientHintsViewportWidth();
+ if (context)
+ context->countClientHintsViewportWidth();
m_shouldSendViewportWidth = true;
}
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ClientHintsPreferences.h ('k') | third_party/WebKit/Source/core/fetch/FetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698