| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste
mURL, const FileMetadata& metadata) | 82 static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste
mURL, const FileMetadata& metadata) |
| 83 { | 83 { |
| 84 OwnPtr<BlobData> blobData = BlobData::create(); | 84 OwnPtr<BlobData> blobData = BlobData::create(); |
| 85 blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), Fi
le::WellKnownContentTypes)); | 85 blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), Fi
le::WellKnownContentTypes)); |
| 86 blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.mo
dificationTime / msPerSecond); | 86 blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.mo
dificationTime / msPerSecond); |
| 87 return blobData.release(); | 87 return blobData.release(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 // static | 90 // static |
| 91 File* File::create(const Vector<BlobOrStringOrArrayBufferViewOrArrayBuffer>& fil
eBits, const String& fileName, const FilePropertyBag& options, ExceptionState& e
xceptionState) | 91 File* File::create(const HeapVector<BlobOrStringOrArrayBufferViewOrArrayBuffer>&
fileBits, const String& fileName, const FilePropertyBag& options, ExceptionStat
e& exceptionState) |
| 92 { | 92 { |
| 93 ASSERT(options.hasType()); | 93 ASSERT(options.hasType()); |
| 94 if (!options.type().containsOnlyASCII()) { | 94 if (!options.type().containsOnlyASCII()) { |
| 95 exceptionState.throwDOMException(SyntaxError, "The 'type' property must
consist of ASCII characters."); | 95 exceptionState.throwDOMException(SyntaxError, "The 'type' property must
consist of ASCII characters."); |
| 96 return nullptr; | 96 return nullptr; |
| 97 } | 97 } |
| 98 | 98 |
| 99 double lastModified; | 99 double lastModified; |
| 100 if (options.hasLastModified()) | 100 if (options.hasLastModified()) |
| 101 lastModified = static_cast<double>(options.lastModified()); | 101 lastModified = static_cast<double>(options.lastModified()); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty()) | 355 if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty()) |
| 356 return false; | 356 return false; |
| 357 | 357 |
| 358 if (!m_fileSystemURL.isEmpty()) | 358 if (!m_fileSystemURL.isEmpty()) |
| 359 return m_fileSystemURL == other.m_fileSystemURL; | 359 return m_fileSystemURL == other.m_fileSystemURL; |
| 360 | 360 |
| 361 return uuid() == other.uuid(); | 361 return uuid() == other.uuid(); |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace blink | 364 } // namespace blink |
| OLD | NEW |