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

Unified Diff: third_party/WebKit/Source/core/fetch/RawResource.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/RawResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/RawResource.cpp b/third_party/WebKit/Source/core/fetch/RawResource.cpp
index 7727f25d7d8b26c480f914c336382333f6094c67..f2b60462bb1efd0d9c398d378ca5b215e4aaa6dd 100644
--- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
@@ -198,8 +198,8 @@ void RawResource::reportResourceTimingToClients(const ResourceTimingInfo& info)
void RawResource::setDefersLoading(bool defers)
{
- if (m_loader)
- m_loader->setDefersLoading(defers);
+ if (loader())
+ loader()->setDefersLoading(defers);
}
static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName)
@@ -231,15 +231,15 @@ bool RawResource::canReuse(const ResourceRequest& newRequest) const
if (dataBufferingPolicy() == DoNotBufferData)
return false;
- if (!isCacheableHTTPMethod(m_resourceRequest.httpMethod()))
+ if (!isCacheableHTTPMethod(resourceRequest().httpMethod()))
return false;
- if (m_resourceRequest.httpMethod() != newRequest.httpMethod())
+ if (resourceRequest().httpMethod() != newRequest.httpMethod())
return false;
- if (m_resourceRequest.httpBody() != newRequest.httpBody())
+ if (resourceRequest().httpBody() != newRequest.httpBody())
return false;
- if (m_resourceRequest.allowStoredCredentials() != newRequest.allowStoredCredentials())
+ if (resourceRequest().allowStoredCredentials() != newRequest.allowStoredCredentials())
return false;
// Ensure most headers match the existing headers before continuing.
@@ -247,7 +247,7 @@ bool RawResource::canReuse(const ResourceRequest& newRequest) const
// A more detailed check of caching policy will be performed later, this is simply a list of
// headers that we might permit to be different and still reuse the existing Resource.
const HTTPHeaderMap& newHeaders = newRequest.httpHeaderFields();
- const HTTPHeaderMap& oldHeaders = m_resourceRequest.httpHeaderFields();
+ const HTTPHeaderMap& oldHeaders = resourceRequest().httpHeaderFields();
for (const auto& header : newHeaders) {
AtomicString headerName = header.key;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698