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

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

Issue 2199713002: Refactoring: Make member variables in Resource 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 33e91c1f23a439f4e22d5b9db247c4cecd93799a..36553ba304f6d24fecebb4fe0764a0c8ebe326d5 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -402,8 +402,8 @@ void ImageResource::updateImage(bool allDataReceived)
if (!m_image || m_image->isNull()) {
if (!errorOccurred())
setStatus(DecodeError);
- if (!allDataReceived && m_loader)
- m_loader->didFinishLoading(nullptr, monotonicallyIncreasingTime(), encodedSize());
+ if (!allDataReceived && loader())
+ loader()->didFinishLoading(nullptr, monotonicallyIncreasingTime(), encodedSize());
clear();
memoryCache()->remove(this);
}
@@ -538,14 +538,14 @@ void ImageResource::updateImageAnimationPolicy()
void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher)
{
- if (m_resourceRequest.loFiState() != WebURLRequest::LoFiOn)
+ if (resourceRequest().loFiState() != WebURLRequest::LoFiOn)
return;
if (isLoaded() && !response().httpHeaderField("chrome-proxy").contains("q=low"))
return;
- m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache);
- m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
+ setCachePolicyBypassingCache();
+ setLoFiStateOff();
if (isLoading())
- m_loader->cancel();
+ loader()->cancel();
clear();
notifyObservers();
@@ -578,8 +578,8 @@ void ImageResource::onePartInMultipartReceived(const ResourceResponse& response)
if (!errorOccurred())
setStatus(Cached);
checkNotify();
- if (m_loader)
- m_loader->didFinishLoadingFirstPartInMultipart();
+ if (loader())
+ loader()->didFinishLoadingFirstPartInMultipart();
}
}
« 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