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

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

Issue 2202173002: Refactoring: Make Resource::m_data private (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address on hiroshige's review Created 4 years, 4 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 f2b60462bb1efd0d9c398d378ca5b215e4aaa6dd..a29802f8d34d6b2d184e823ade028f007fead5dc 100644
--- a/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResource.cpp
@@ -119,8 +119,8 @@ void RawResource::didAddClient(ResourceClient* c)
client->responseReceived(this, response(), nullptr);
if (!clientWeak || !hasClient(c))
return;
- if (m_data)
- client->dataReceived(this, m_data->data(), m_data->size());
+ if (data())
+ client->dataReceived(this, data()->data(), data()->size());
if (!clientWeak || !hasClient(c))
return;
Resource::didAddClient(client);
@@ -160,10 +160,10 @@ void RawResource::responseReceived(const ResourceResponse& response, std::unique
// Forward the data to clients now instead.
// Note: |m_data| can be null when no data is appended to the original
// resource.
- if (isSuccessfulRevalidation && m_data) {
+ if (isSuccessfulRevalidation && data()) {
ResourceClientWalker<RawResourceClient> w(clients());
while (RawResourceClient* c = w.next())
- c->dataReceived(this, m_data->data(), m_data->size());
+ c->dataReceived(this, data()->data(), data()->size());
}
}
« 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