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

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

Issue 2183323005: Make Resource::m_response private (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index aa570eceff4acb20e4c83cef9ed92b345dfa74e9..33e91c1f23a439f4e22d5b9db247c4cecd93799a 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -358,7 +358,7 @@ inline void ImageResource::createImage()
if (m_image)
return;
- if (m_response.mimeType() == "image/svg+xml") {
+ if (response().mimeType() == "image/svg+xml") {
m_image = SVGImage::create(this);
} else {
m_image = BitmapImage::create(this);
@@ -456,7 +456,7 @@ void ImageResource::responseReceived(const ResourceResponse& response, std::uniq
m_multipartParser = new MultipartImageResourceParser(response, response.multipartBoundary(), this);
Resource::responseReceived(response, std::move(handle));
if (RuntimeEnabledFeatures::clientHintsEnabled()) {
- m_devicePixelRatioHeaderValue = m_response.httpHeaderField(HTTPNames::Content_DPR).toFloat(&m_hasDevicePixelRatioHeaderValue);
+ m_devicePixelRatioHeaderValue = this->response().httpHeaderField(HTTPNames::Content_DPR).toFloat(&m_hasDevicePixelRatioHeaderValue);
if (!m_hasDevicePixelRatioHeaderValue || m_devicePixelRatioHeaderValue <= 0.0) {
m_devicePixelRatioHeaderValue = 1.0;
m_hasDevicePixelRatioHeaderValue = false;
@@ -540,7 +540,7 @@ void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher)
{
if (m_resourceRequest.loFiState() != WebURLRequest::LoFiOn)
return;
- if (isLoaded() && !m_response.httpHeaderField("chrome-proxy").contains("q=low"))
+ if (isLoaded() && !response().httpHeaderField("chrome-proxy").contains("q=low"))
return;
m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache);
m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
@@ -564,7 +564,7 @@ void ImageResource::onePartInMultipartReceived(const ResourceResponse& response)
{
ASSERT(m_multipartParser);
- m_response = response;
+ setResponse(response);
if (m_multipartParsingState == MultipartParsingState::WaitingForFirstPart) {
// We have nothing to do because we don't have any data.
m_multipartParsingState = MultipartParsingState::ParsingFirstPart;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp ('k') | third_party/WebKit/Source/core/fetch/RawResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698