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

Side by Side Diff: Source/core/fileapi/FileReaderLoader.cpp

Issue 74493002: Removed refcounting from TextResourceDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_step2
Patch Set: Compile fix Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/fileapi/FileReaderLoader.h ('k') | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 void FileReaderLoader::cleanup() 157 void FileReaderLoader::cleanup()
158 { 158 {
159 m_loader = 0; 159 m_loader = 0;
160 160
161 // If we get any error, we do not need to keep a buffer around. 161 // If we get any error, we do not need to keep a buffer around.
162 if (m_errorCode) { 162 if (m_errorCode) {
163 m_rawData.clear(); 163 m_rawData.clear();
164 m_stringResult = ""; 164 m_stringResult = "";
165 m_isRawDataConverted = true; 165 m_isRawDataConverted = true;
166 m_decoder = 0; 166 m_decoder.clear();
167 } 167 }
168 } 168 }
169 169
170 void FileReaderLoader::didReceiveResponse(unsigned long, const ResourceResponse& response) 170 void FileReaderLoader::didReceiveResponse(unsigned long, const ResourceResponse& response)
171 { 171 {
172 if (response.httpStatusCode() != 200) { 172 if (response.httpStatusCode() != 200) {
173 failed(httpStatusCodeToErrorCode(response.httpStatusCode())); 173 failed(httpStatusCodeToErrorCode(response.httpStatusCode()));
174 return; 174 return;
175 } 175 }
176 176
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 m_stringResult = builder.toString(); 394 m_stringResult = builder.toString();
395 } 395 }
396 396
397 void FileReaderLoader::setEncoding(const String& encoding) 397 void FileReaderLoader::setEncoding(const String& encoding)
398 { 398 {
399 if (!encoding.isEmpty()) 399 if (!encoding.isEmpty())
400 m_encoding = WTF::TextEncoding(encoding); 400 m_encoding = WTF::TextEncoding(encoding);
401 } 401 }
402 402
403 } // namespace WebCore 403 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/fileapi/FileReaderLoader.h ('k') | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698