OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 }; | 136 }; |
137 | 137 |
138 } // namespace | 138 } // namespace |
139 | 139 |
140 File* DOMFileSystemSync::createFile(const FileEntrySync* fileEntry, | 140 File* DOMFileSystemSync::createFile(const FileEntrySync* fileEntry, |
141 ExceptionState& exceptionState) { | 141 ExceptionState& exceptionState) { |
142 KURL fileSystemURL = createFileSystemURL(fileEntry); | 142 KURL fileSystemURL = createFileSystemURL(fileEntry); |
143 CreateFileHelper::CreateFileResult* result( | 143 CreateFileHelper::CreateFileResult* result( |
144 CreateFileHelper::CreateFileResult::create()); | 144 CreateFileHelper::CreateFileResult::create()); |
145 fileSystem()->createSnapshotFileAndReadMetadata( | 145 fileSystem()->createSnapshotFileAndReadMetadata( |
146 fileSystemURL, CreateFileHelper::create(result, fileEntry->name(), | 146 fileSystemURL, |
147 fileSystemURL, type())); | 147 CreateFileHelper::create(result, fileEntry->name(), fileSystemURL, |
| 148 type())); |
148 if (result->m_failed) { | 149 if (result->m_failed) { |
149 exceptionState.throwDOMException( | 150 exceptionState.throwDOMException( |
150 result->m_code, "Could not create '" + fileEntry->name() + "'."); | 151 result->m_code, "Could not create '" + fileEntry->name() + "'."); |
151 return nullptr; | 152 return nullptr; |
152 } | 153 } |
153 return result->m_file.get(); | 154 return result->m_file.get(); |
154 } | 155 } |
155 | 156 |
156 namespace { | 157 namespace { |
157 | 158 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 212 } |
212 return fileWriter; | 213 return fileWriter; |
213 } | 214 } |
214 | 215 |
215 DEFINE_TRACE(DOMFileSystemSync) { | 216 DEFINE_TRACE(DOMFileSystemSync) { |
216 DOMFileSystemBase::trace(visitor); | 217 DOMFileSystemBase::trace(visitor); |
217 visitor->trace(m_rootEntry); | 218 visitor->trace(m_rootEntry); |
218 } | 219 } |
219 | 220 |
220 } // namespace blink | 221 } // namespace blink |
OLD | NEW |