| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 : Blob(BlobDataHandle::create(createBlobDataForFileWithName(path, name, poli
cy), -1)) | 107 : Blob(BlobDataHandle::create(createBlobDataForFileWithName(path, name, poli
cy), -1)) |
| 108 , m_hasBackingFile(true) | 108 , m_hasBackingFile(true) |
| 109 , m_path(path) | 109 , m_path(path) |
| 110 , m_name(name) | 110 , m_name(name) |
| 111 , m_snapshotSize(-1) | 111 , m_snapshotSize(-1) |
| 112 , m_snapshotModificationTime(invalidFileTime()) | 112 , m_snapshotModificationTime(invalidFileTime()) |
| 113 { | 113 { |
| 114 ScriptWrappable::init(this); | 114 ScriptWrappable::init(this); |
| 115 } | 115 } |
| 116 | 116 |
| 117 File::File(const String& path, const String& name, PassRefPtr<BlobDataHandle> bl
obDataHandle, double lastModified, long long size) |
| 118 : Blob(blobDataHandle) |
| 119 , m_path(path) |
| 120 , m_name(name) |
| 121 , m_snapshotSize(size) |
| 122 , m_snapshotModificationTime(lastModified) |
| 123 { |
| 124 ScriptWrappable::init(this); |
| 125 } |
| 126 |
| 117 File::File(const String& path, PassRefPtr<BlobDataHandle> blobDataHandle) | 127 File::File(const String& path, PassRefPtr<BlobDataHandle> blobDataHandle) |
| 118 : Blob(blobDataHandle) | 128 : Blob(blobDataHandle) |
| 119 , m_hasBackingFile(true) | 129 , m_hasBackingFile(true) |
| 120 , m_path(path) | 130 , m_path(path) |
| 121 , m_name(blink::Platform::current()->fileUtilities()->baseName(path)) | 131 , m_name(blink::Platform::current()->fileUtilities()->baseName(path)) |
| 122 , m_snapshotSize(-1) | 132 , m_snapshotSize(-1) |
| 123 , m_snapshotModificationTime(invalidFileTime()) | 133 , m_snapshotModificationTime(invalidFileTime()) |
| 124 { | 134 { |
| 125 ScriptWrappable::init(this); | 135 ScriptWrappable::init(this); |
| 126 // FIXME: File object serialization/deserialization does not include | 136 // FIXME: File object serialization/deserialization does not include |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 snapshotSize = 0; | 209 snapshotSize = 0; |
| 200 snapshotModificationTime = invalidFileTime(); | 210 snapshotModificationTime = invalidFileTime(); |
| 201 return; | 211 return; |
| 202 } | 212 } |
| 203 | 213 |
| 204 snapshotSize = metadata.length; | 214 snapshotSize = metadata.length; |
| 205 snapshotModificationTime = metadata.modificationTime; | 215 snapshotModificationTime = metadata.modificationTime; |
| 206 } | 216 } |
| 207 | 217 |
| 208 } // namespace WebCore | 218 } // namespace WebCore |
| OLD | NEW |