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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 static PassRefPtrWillBeRawPtr<File> create(const String& name, double modifi cationTime, PassRefPtr<BlobDataHandle> blobDataHandle) | 55 static PassRefPtrWillBeRawPtr<File> create(const String& name, double modifi cationTime, PassRefPtr<BlobDataHandle> blobDataHandle) |
56 { | 56 { |
57 return adoptRefWillBeNoop(new File(name, modificationTime, blobDataHandl e)); | 57 return adoptRefWillBeNoop(new File(name, modificationTime, blobDataHandl e)); |
58 } | 58 } |
59 | 59 |
60 // For deserialization. | 60 // For deserialization. |
61 static PassRefPtrWillBeRawPtr<File> create(const String& path, const String& name, const String& relativePath, bool hasSnaphotData, uint64_t size, double la stModified, PassRefPtr<BlobDataHandle> blobDataHandle) | 61 static PassRefPtrWillBeRawPtr<File> create(const String& path, const String& name, const String& relativePath, bool hasSnaphotData, uint64_t size, double la stModified, PassRefPtr<BlobDataHandle> blobDataHandle) |
62 { | 62 { |
63 return adoptRefWillBeNoop(new File(path, name, relativePath, hasSnaphotD ata, size, lastModified, blobDataHandle)); | 63 return adoptRefWillBeNoop(new File(path, name, relativePath, hasSnaphotD ata, size, lastModified, blobDataHandle)); |
64 } | 64 } |
65 static PassRefPtr<File> create(const String& path, const String& name, PassR efPtr<BlobDataHandle> blobDataHandle, double lastModified, long long size) | |
jsbell
2014/04/03 18:16:33
The previous create() has size as uint64_t instead
ericu
2014/04/07 23:14:20
Good point; done.
| |
66 { | |
67 return adoptRef(new File(path, name, String(), true, size, lastModified, blobDataHandle)); | |
68 } | |
65 | 69 |
66 static PassRefPtrWillBeRawPtr<File> createWithRelativePath(const String& pat h, const String& relativePath); | 70 static PassRefPtrWillBeRawPtr<File> createWithRelativePath(const String& pat h, const String& relativePath); |
67 | 71 |
68 // If filesystem files live in the remote filesystem, the port might pass th e valid metadata (whose length field is non-negative) and cache in the File obje ct. | 72 // If filesystem files live in the remote filesystem, the port might pass th e valid metadata (whose length field is non-negative) and cache in the File obje ct. |
69 // | 73 // |
70 // Otherwise calling size(), lastModifiedTime() and slice() will synchronous ly query the file metadata. | 74 // Otherwise calling size(), lastModifiedTime() and slice() will synchronous ly query the file metadata. |
71 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& na me, const FileMetadata& metadata) | 75 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& na me, const FileMetadata& metadata) |
72 { | 76 { |
73 return adoptRefWillBeNoop(new File(name, metadata)); | 77 return adoptRefWillBeNoop(new File(name, metadata)); |
74 } | 78 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 const double m_snapshotModificationTime; | 144 const double m_snapshotModificationTime; |
141 | 145 |
142 String m_relativePath; | 146 String m_relativePath; |
143 }; | 147 }; |
144 | 148 |
145 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); | 149 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); |
146 | 150 |
147 } // namespace WebCore | 151 } // namespace WebCore |
148 | 152 |
149 #endif // File_h | 153 #endif // File_h |
OLD | NEW |