| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK) | 320 #if USE(NETWORK_CFDATA_ARRAY_CALLBACK) |
| 321 ASSERT(maxSegmentedSize <= position); | 321 ASSERT(maxSegmentedSize <= position); |
| 322 position -= maxSegmentedSize; | 322 position -= maxSegmentedSize; |
| 323 return copySomeDataFromDataArray(someData, position); | 323 return copySomeDataFromDataArray(someData, position); |
| 324 #else | 324 #else |
| 325 ASSERT_NOT_REACHED(); | 325 ASSERT_NOT_REACHED(); |
| 326 return 0; | 326 return 0; |
| 327 #endif | 327 #endif |
| 328 } | 328 } |
| 329 | 329 |
| 330 #if !USE(CF) || PLATFORM(QT) | 330 #if !USE(CF) |
| 331 | 331 |
| 332 inline void SharedBuffer::clearPlatformData() | 332 inline void SharedBuffer::clearPlatformData() |
| 333 { | 333 { |
| 334 } | 334 } |
| 335 | 335 |
| 336 inline void SharedBuffer::maybeTransferPlatformData() | 336 inline void SharedBuffer::maybeTransferPlatformData() |
| 337 { | 337 { |
| 338 } | 338 } |
| 339 | 339 |
| 340 inline bool SharedBuffer::hasPlatformData() const | 340 inline bool SharedBuffer::hasPlatformData() const |
| (...skipping 28 matching lines...) Expand all Loading... |
| 369 const UChar* d = string.characters(); | 369 const UChar* d = string.characters(); |
| 370 WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF16ToUTF8(&d,
d + length, &p, p + buffer.size(), true); | 370 WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF16ToUTF8(&d,
d + length, &p, p + buffer.size(), true); |
| 371 if (result != WTF::Unicode::conversionOK) | 371 if (result != WTF::Unicode::conversionOK) |
| 372 return 0; | 372 return 0; |
| 373 | 373 |
| 374 buffer.shrink(p - buffer.data()); | 374 buffer.shrink(p - buffer.data()); |
| 375 return SharedBuffer::adoptVector(buffer); | 375 return SharedBuffer::adoptVector(buffer); |
| 376 } | 376 } |
| 377 | 377 |
| 378 } // namespace WebCore | 378 } // namespace WebCore |
| OLD | NEW |