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

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

Issue 2148183002: Refactoring: Move some Resource members from protected to 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 d6cfe5764744c359cf55a21268e55da4f1a3c563..3124cf8dd85b5864534d59567f206183da19bb6a 100644
--- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
@@ -96,7 +96,7 @@ void RawResource::appendData(const char* data, size_t length)
{
Resource::appendData(data, length);
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->dataReceived(this, data, length);
}
@@ -131,14 +131,14 @@ void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Resource::willFollowRedirect(newRequest, redirectResponse);
ASSERT(!redirectResponse.isNull());
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->redirectReceived(this, newRequest, redirectResponse);
}
void RawResource::willNotFollowRedirect()
{
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->redirectBlocked();
}
@@ -148,7 +148,7 @@ void RawResource::responseReceived(const ResourceResponse& response, std::unique
bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCode() == 304;
Resource::responseReceived(response, nullptr);
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
ASSERT(count() <= 1 || !handle);
while (RawResourceClient* c = w.next()) {
// |handle| is cleared when passed, but it's not a problem because
@@ -161,7 +161,7 @@ void RawResource::responseReceived(const ResourceResponse& response, std::unique
// Note: |m_data| can be null when no data is appended to the original
// resource.
if (isSuccessfulRevalidation && m_data) {
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->dataReceived(this, m_data->data(), m_data->size());
}
@@ -170,28 +170,28 @@ void RawResource::responseReceived(const ResourceResponse& response, std::unique
void RawResource::setSerializedCachedMetadata(const char* data, size_t size)
{
Resource::setSerializedCachedMetadata(data, size);
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->setSerializedCachedMetadata(this, data, size);
}
void RawResource::didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
{
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->dataSent(this, bytesSent, totalBytesToBeSent);
}
void RawResource::didDownloadData(int dataLength)
{
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->dataDownloaded(this, dataLength);
}
void RawResource::reportResourceTimingToClients(const ResourceTimingInfo& info)
{
- ResourceClientWalker<RawResourceClient> w(m_clients);
+ ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
c->didReceiveResourceTiming(this, info);
}
@@ -229,7 +229,7 @@ static bool isCacheableHTTPMethod(const AtomicString& method)
bool RawResource::canReuse(const ResourceRequest& newRequest) const
{
- if (m_options.dataBufferingPolicy == DoNotBufferData)
+ if (dataBufferingPolicy() == DoNotBufferData)
return false;
if (!isCacheableHTTPMethod(m_resourceRequest.httpMethod()))
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.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