| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/fetch/TextResource.h" | 5 #include "core/loader/resource/TextResource.h" |
| 6 | 6 |
| 7 #include "core/html/parser/TextResourceDecoder.h" | 7 #include "core/html/parser/TextResourceDecoder.h" |
| 8 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
| 9 #include "wtf/text/StringBuilder.h" | 9 #include "wtf/text/StringBuilder.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 TextResource::TextResource(const ResourceRequest& resourceRequest, | 13 TextResource::TextResource(const ResourceRequest& resourceRequest, |
| 14 Resource::Type type, | 14 Resource::Type type, |
| 15 const ResourceLoaderOptions& options, | 15 const ResourceLoaderOptions& options, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 36 size_t position = 0; | 36 size_t position = 0; |
| 37 while (size_t length = data()->getSomeData(segment, position)) { | 37 while (size_t length = data()->getSomeData(segment, position)) { |
| 38 builder.append(m_decoder->decode(segment, length)); | 38 builder.append(m_decoder->decode(segment, length)); |
| 39 position += length; | 39 position += length; |
| 40 } | 40 } |
| 41 builder.append(m_decoder->flush()); | 41 builder.append(m_decoder->flush()); |
| 42 return builder.toString(); | 42 return builder.toString(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace blink | 45 } // namespace blink |
| OLD | NEW |