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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 private: | 119 private: |
120 File(const String& path, ContentTypeLookupPolicy); | 120 File(const String& path, ContentTypeLookupPolicy); |
121 File(const String& path, const String& name, ContentTypeLookupPolicy); | 121 File(const String& path, const String& name, ContentTypeLookupPolicy); |
122 File(const String& path, const String& name, const String& relativePath, boo
l hasSnaphotData, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle>
); | 122 File(const String& path, const String& name, const String& relativePath, boo
l hasSnaphotData, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle>
); |
123 File(const String& name, double modificationTime, PassRefPtr<BlobDataHandle>
); | 123 File(const String& name, double modificationTime, PassRefPtr<BlobDataHandle>
); |
124 File(const String& name, const FileMetadata&); | 124 File(const String& name, const FileMetadata&); |
125 File(const KURL& fileSystemURL, const FileMetadata&); | 125 File(const KURL& fileSystemURL, const FileMetadata&); |
126 | 126 |
127 void invalidateSnapshotMetadata() { m_snapshotSize = -1; } | 127 void invalidateSnapshotMetadata() { m_snapshotSize = -1; } |
128 | 128 |
129 #ifndef NDEBUG | 129 #if ENABLE(ASSERT) |
130 bool hasValidFileSystemURL() const { return hasBackingFile(); } | 130 bool hasValidFileSystemURL() const { return hasBackingFile(); } |
131 // Instances not backed by a file must have an empty path set. | 131 // Instances not backed by a file must have an empty path set. |
132 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty();
} | 132 bool hasValidFilePath() const { return hasBackingFile() || m_path.isEmpty();
} |
133 #endif | 133 #endif |
134 | 134 |
135 bool m_hasBackingFile; | 135 bool m_hasBackingFile; |
136 String m_path; | 136 String m_path; |
137 String m_name; | 137 String m_name; |
138 | 138 |
139 KURL m_fileSystemURL; | 139 KURL m_fileSystemURL; |
140 | 140 |
141 // If m_snapshotSize is negative (initialized to -1 by default), the snapsho
t metadata is invalid and we retrieve the latest metadata synchronously in size(
), lastModifiedTime() and slice(). | 141 // If m_snapshotSize is negative (initialized to -1 by default), the snapsho
t metadata is invalid and we retrieve the latest metadata synchronously in size(
), lastModifiedTime() and slice(). |
142 // Otherwise, the snapshot metadata are used directly in those methods. | 142 // Otherwise, the snapshot metadata are used directly in those methods. |
143 long long m_snapshotSize; | 143 long long m_snapshotSize; |
144 const double m_snapshotModificationTime; | 144 const double m_snapshotModificationTime; |
145 | 145 |
146 String m_relativePath; | 146 String m_relativePath; |
147 }; | 147 }; |
148 | 148 |
149 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); | 149 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); |
150 | 150 |
151 } // namespace WebCore | 151 } // namespace WebCore |
152 | 152 |
153 #endif // File_h | 153 #endif // File_h |
OLD | NEW |