| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 RefPtrWillBeRawPtr<File> file = adoptRefWillBeNoop(new File(path, File::AllC
ontentTypes, File::IsUserVisible)); | 91 RefPtrWillBeRawPtr<File> file = adoptRefWillBeNoop(new File(path, File::AllC
ontentTypes, File::IsUserVisible)); |
| 92 file->m_relativePath = relativePath; | 92 file->m_relativePath = relativePath; |
| 93 return file.release(); | 93 return file.release(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 File::File(const String& path, ContentTypeLookupPolicy policy, UserVisibility us
erVisibility) | 96 File::File(const String& path, ContentTypeLookupPolicy policy, UserVisibility us
erVisibility) |
| 97 : Blob(BlobDataHandle::create(createBlobDataForFile(path, policy), -1)) | 97 : Blob(BlobDataHandle::create(createBlobDataForFile(path, policy), -1)) |
| 98 , m_hasBackingFile(true) | 98 , m_hasBackingFile(true) |
| 99 , m_userVisibility(userVisibility) | 99 , m_userVisibility(userVisibility) |
| 100 , m_path(path) | 100 , m_path(path) |
| 101 , m_name(blink::Platform::current()->fileUtilities()->baseName(path)) | 101 , m_name(Platform::current()->fileUtilities()->baseName(path)) |
| 102 , m_snapshotSize(-1) | 102 , m_snapshotSize(-1) |
| 103 , m_snapshotModificationTime(invalidFileTime()) | 103 , m_snapshotModificationTime(invalidFileTime()) |
| 104 { | 104 { |
| 105 ScriptWrappable::init(this); | 105 ScriptWrappable::init(this); |
| 106 } | 106 } |
| 107 | 107 |
| 108 File::File(const String& path, const String& name, ContentTypeLookupPolicy polic
y, UserVisibility userVisibility) | 108 File::File(const String& path, const String& name, ContentTypeLookupPolicy polic
y, UserVisibility userVisibility) |
| 109 : Blob(BlobDataHandle::create(createBlobDataForFileWithName(path, name, poli
cy), -1)) | 109 : Blob(BlobDataHandle::create(createBlobDataForFileWithName(path, name, poli
cy), -1)) |
| 110 , m_hasBackingFile(true) | 110 , m_hasBackingFile(true) |
| 111 , m_userVisibility(userVisibility) | 111 , m_userVisibility(userVisibility) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 captureSnapshot(size, modificationTime); | 296 captureSnapshot(size, modificationTime); |
| 297 if (!m_fileSystemURL.isEmpty()) { | 297 if (!m_fileSystemURL.isEmpty()) { |
| 298 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime)
; | 298 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime)
; |
| 299 return; | 299 return; |
| 300 } | 300 } |
| 301 ASSERT(!m_path.isEmpty()); | 301 ASSERT(!m_path.isEmpty()); |
| 302 blobData.appendFile(m_path, 0, size, modificationTime); | 302 blobData.appendFile(m_path, 0, size, modificationTime); |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |