| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 m_stringResult = ""; | 175 m_stringResult = ""; |
| 176 m_isRawDataConverted = true; | 176 m_isRawDataConverted = true; |
| 177 m_decoder.reset(); | 177 m_decoder.reset(); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 void FileReaderLoader::didReceiveResponse( | 181 void FileReaderLoader::didReceiveResponse( |
| 182 unsigned long, | 182 unsigned long, |
| 183 const ResourceResponse& response, | 183 const ResourceResponse& response, |
| 184 std::unique_ptr<WebDataConsumerHandle> handle) { | 184 std::unique_ptr<WebDataConsumerHandle> handle) { |
| 185 ASSERT_UNUSED(handle, !handle); | 185 DCHECK(!handle); |
| 186 if (response.httpStatusCode() != 200) { | 186 if (response.httpStatusCode() != 200) { |
| 187 failed(httpStatusCodeToErrorCode(response.httpStatusCode())); | 187 failed(httpStatusCodeToErrorCode(response.httpStatusCode())); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 | 190 |
| 191 // A negative value means that the content length wasn't specified. | 191 // A negative value means that the content length wasn't specified. |
| 192 m_totalBytes = response.expectedContentLength(); | 192 m_totalBytes = response.expectedContentLength(); |
| 193 | 193 |
| 194 long long initialBufferLength = -1; | 194 long long initialBufferLength = -1; |
| 195 | 195 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 m_stringResult = builder.toString(); | 416 m_stringResult = builder.toString(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void FileReaderLoader::setEncoding(const String& encoding) { | 419 void FileReaderLoader::setEncoding(const String& encoding) { |
| 420 if (!encoding.isEmpty()) | 420 if (!encoding.isEmpty()) |
| 421 m_encoding = WTF::TextEncoding(encoding); | 421 m_encoding = WTF::TextEncoding(encoding); |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace blink | 424 } // namespace blink |
| OLD | NEW |