| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& pa
th, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes) | 99 static PassRefPtrWillBeRawPtr<File> createForFileSystemFile(const String& pa
th, const String& name, ContentTypeLookupPolicy policy = WellKnownContentTypes) |
| 100 { | 100 { |
| 101 if (name.isEmpty()) | 101 if (name.isEmpty()) |
| 102 return adoptRefWillBeNoop(new File(path, policy, File::IsNotUserVisi
ble)); | 102 return adoptRefWillBeNoop(new File(path, policy, File::IsNotUserVisi
ble)); |
| 103 return adoptRefWillBeNoop(new File(path, name, policy, File::IsNotUserVi
sible)); | 103 return adoptRefWillBeNoop(new File(path, name, policy, File::IsNotUserVi
sible)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 virtual unsigned long long size() const OVERRIDE; | 106 virtual unsigned long long size() const OVERRIDE; |
| 107 virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start, long long end, c
onst String& contentType, ExceptionState&) const OVERRIDE; | 107 virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start, Optional<long lo
ng> end, const String& contentType, ExceptionState&) const OVERRIDE; |
| 108 virtual void close(ExecutionContext*, ExceptionState&) OVERRIDE; | 108 virtual void close(ExecutionContext*, ExceptionState&) OVERRIDE; |
| 109 | 109 |
| 110 virtual bool isFile() const OVERRIDE { return true; } | 110 virtual bool isFile() const OVERRIDE { return true; } |
| 111 virtual bool hasBackingFile() const OVERRIDE { return m_hasBackingFile; } | 111 virtual bool hasBackingFile() const OVERRIDE { return m_hasBackingFile; } |
| 112 | 112 |
| 113 virtual void appendTo(BlobData&) const OVERRIDE; | 113 virtual void appendTo(BlobData&) const OVERRIDE; |
| 114 | 114 |
| 115 const String& path() const { ASSERT(hasValidFilePath()); return m_path; } | 115 const String& path() const { ASSERT(hasValidFilePath()); return m_path; } |
| 116 const String name() const { return m_name; } | 116 const String name() const { return m_name; } |
| 117 | 117 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 const double m_snapshotModificationTime; | 167 const double m_snapshotModificationTime; |
| 168 | 168 |
| 169 String m_relativePath; | 169 String m_relativePath; |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); | 172 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| 175 | 175 |
| 176 #endif // File_h | 176 #endif // File_h |
| OLD | NEW |