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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 static File* create(const String& path, ContentTypeLookupPolicy policy = Wel
lKnownContentTypes) | 61 static File* create(const String& path, ContentTypeLookupPolicy policy = Wel
lKnownContentTypes) |
62 { | 62 { |
63 return new File(path, policy, File::IsUserVisible); | 63 return new File(path, policy, File::IsUserVisible); |
64 } | 64 } |
65 | 65 |
66 static File* create(const String& name, double modificationTime, PassRefPtr<
BlobDataHandle> blobDataHandle) | 66 static File* create(const String& name, double modificationTime, PassRefPtr<
BlobDataHandle> blobDataHandle) |
67 { | 67 { |
68 return new File(name, modificationTime, blobDataHandle); | 68 return new File(name, modificationTime, blobDataHandle); |
69 } | 69 } |
70 | 70 |
71 static File* create(char* data, size_t bytes, const String& mimeType); | 71 static File* create(const char* data, size_t bytes, const String& mimeType); |
72 | 72 |
73 // For deserialization. | 73 // For deserialization. |
74 static File* createFromSerialization(const String& path, const String& name,
const String& relativePath, UserVisibility userVisibility, bool hasSnaphotData,
uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> blobDataHandle) | 74 static File* createFromSerialization(const String& path, const String& name,
const String& relativePath, UserVisibility userVisibility, bool hasSnaphotData,
uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> blobDataHandle) |
75 { | 75 { |
76 return new File(path, name, relativePath, userVisibility, hasSnaphotData
, size, lastModified, blobDataHandle); | 76 return new File(path, name, relativePath, userVisibility, hasSnaphotData
, size, lastModified, blobDataHandle); |
77 } | 77 } |
78 static File* createFromIndexedSerialization(const String& path, const String
& name, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> blobDataH
andle) | 78 static File* createFromIndexedSerialization(const String& path, const String
& name, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> blobDataH
andle) |
79 { | 79 { |
80 return new File(path, name, String(), IsNotUserVisible, true, size, last
Modified, blobDataHandle); | 80 return new File(path, name, String(), IsNotUserVisible, true, size, last
Modified, blobDataHandle); |
81 } | 81 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 const double m_snapshotModificationTimeMS; | 183 const double m_snapshotModificationTimeMS; |
184 | 184 |
185 String m_relativePath; | 185 String m_relativePath; |
186 }; | 186 }; |
187 | 187 |
188 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); | 188 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
191 | 191 |
192 #endif // File_h | 192 #endif // File_h |
OLD | NEW |