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

Unified Diff: third_party/WebKit/Source/core/fetch/TextResource.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/TextResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/TextResource.cpp b/third_party/WebKit/Source/core/fetch/TextResource.cpp
index f4878dd3c04ced697feb7a0274df619b21e602aa..35eeaeaad38af09a56d8a42ab6d50b97ad3b2903 100644
--- a/third_party/WebKit/Source/core/fetch/TextResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/TextResource.cpp
@@ -32,13 +32,13 @@ String TextResource::encoding() const
String TextResource::decodedText() const
{
- ASSERT(m_data);
+ DCHECK(data());
StringBuilder builder;
- const char* data;
+ const char* segment;
size_t position = 0;
- while (size_t length = m_data->getSomeData(data, position)) {
- builder.append(m_decoder->decode(data, length));
+ while (size_t length = data()->getSomeData(segment, position)) {
+ builder.append(m_decoder->decode(segment, length));
position += length;
}
builder.append(m_decoder->flush());

Powered by Google App Engine
This is Rietveld 408576698