| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 end = 0; | 117 end = 0; |
| 118 } else if (end < start) | 118 } else if (end < start) |
| 119 end = start; | 119 end = start; |
| 120 else if (end > size) | 120 else if (end > size) |
| 121 end = size; | 121 end = size; |
| 122 | 122 |
| 123 long long length = end - start; | 123 long long length = end - start; |
| 124 OwnPtr<BlobData> blobData = BlobData::create(); | 124 OwnPtr<BlobData> blobData = BlobData::create(); |
| 125 blobData->setContentType(contentType); | 125 blobData->setContentType(contentType); |
| 126 if (isFile()) { | 126 if (isFile()) { |
| 127 #if ENABLE(FILE_SYSTEM) | |
| 128 if (!toFile(this)->fileSystemURL().isEmpty()) | 127 if (!toFile(this)->fileSystemURL().isEmpty()) |
| 129 blobData->appendURL(toFile(this)->fileSystemURL(), start, length, mo
dificationTime); | 128 blobData->appendURL(toFile(this)->fileSystemURL(), start, length, mo
dificationTime); |
| 130 else | 129 else |
| 131 #endif | 130 blobData->appendFile(toFile(this)->path(), start, length, modificati
onTime); |
| 132 blobData->appendFile(toFile(this)->path(), start, length, modificationTi
me); | |
| 133 } else | 131 } else |
| 134 blobData->appendBlob(m_internalURL, start, length); | 132 blobData->appendBlob(m_internalURL, start, length); |
| 135 | 133 |
| 136 return Blob::create(blobData.release(), length); | 134 return Blob::create(blobData.release(), length); |
| 137 } | 135 } |
| 138 #endif | 136 #endif |
| 139 | 137 |
| 140 } // namespace WebCore | 138 } // namespace WebCore |
| OLD | NEW |