Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 | 164 |
| 165 // If we get any error, we do not need to keep a buffer around. | 165 // If we get any error, we do not need to keep a buffer around. |
| 166 if (m_errorCode) { | 166 if (m_errorCode) { |
| 167 m_rawData.clear(); | 167 m_rawData.clear(); |
| 168 m_stringResult = ""; | 168 m_stringResult = ""; |
| 169 m_isRawDataConverted = true; | 169 m_isRawDataConverted = true; |
| 170 m_decoder.clear(); | 170 m_decoder.clear(); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 void FileReaderLoader::didReceiveResponse(unsigned long, const ResourceResponse& response) | 174 void FileReaderLoader::didReceiveResponse(unsigned long, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle) |
| 175 { | 175 { |
| 176 ASSERT_UNUSED(handle, !handle); | |
|
Mike West
2014/11/04 15:09:31
Why this ASSERT?
yhirano
2014/11/05 04:38:40
I'm planning to use this parameter only for XHR an
| |
| 176 if (response.httpStatusCode() != 200) { | 177 if (response.httpStatusCode() != 200) { |
| 177 failed(httpStatusCodeToErrorCode(response.httpStatusCode())); | 178 failed(httpStatusCodeToErrorCode(response.httpStatusCode())); |
| 178 return; | 179 return; |
| 179 } | 180 } |
| 180 | 181 |
| 181 // A negative value means that the content length wasn't specified. | 182 // A negative value means that the content length wasn't specified. |
| 182 m_totalBytes = response.expectedContentLength(); | 183 m_totalBytes = response.expectedContentLength(); |
| 183 | 184 |
| 184 long long initialBufferLength = -1; | 185 long long initialBufferLength = -1; |
| 185 | 186 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 m_stringResult = builder.toString(); | 400 m_stringResult = builder.toString(); |
| 400 } | 401 } |
| 401 | 402 |
| 402 void FileReaderLoader::setEncoding(const String& encoding) | 403 void FileReaderLoader::setEncoding(const String& encoding) |
| 403 { | 404 { |
| 404 if (!encoding.isEmpty()) | 405 if (!encoding.isEmpty()) |
| 405 m_encoding = WTF::TextEncoding(encoding); | 406 m_encoding = WTF::TextEncoding(encoding); |
| 406 } | 407 } |
| 407 | 408 |
| 408 } // namespace blink | 409 } // namespace blink |
| OLD | NEW |