| 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;
|
| }
|
| }
|
|
|