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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 m_stringResult = builder.toString(); | 370 m_stringResult = builder.toString(); |
371 return; | 371 return; |
372 } | 372 } |
373 | 373 |
374 builder.append(m_dataType); | 374 builder.append(m_dataType); |
375 builder.append(";base64,"); | 375 builder.append(";base64,"); |
376 | 376 |
377 Vector<char> out; | 377 Vector<char> out; |
378 base64Encode(static_cast<const char*>(m_rawData->data()), | 378 base64Encode(static_cast<const char*>(m_rawData->data()), |
379 m_rawData->byteLength(), out); | 379 m_rawData->byteLength(), out); |
380 out.append('\0'); | 380 out.push_back('\0'); |
381 builder.append(out.data()); | 381 builder.append(out.data()); |
382 | 382 |
383 m_stringResult = builder.toString(); | 383 m_stringResult = builder.toString(); |
384 } | 384 } |
385 | 385 |
386 void FileReaderLoader::setEncoding(const String& encoding) { | 386 void FileReaderLoader::setEncoding(const String& encoding) { |
387 if (!encoding.isEmpty()) | 387 if (!encoding.isEmpty()) |
388 m_encoding = WTF::TextEncoding(encoding); | 388 m_encoding = WTF::TextEncoding(encoding); |
389 } | 389 } |
390 | 390 |
391 } // namespace blink | 391 } // namespace blink |
OLD | NEW |