| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void LocalFileSystem::fileSystemAllowedInternal( | 155 void LocalFileSystem::fileSystemAllowedInternal( |
| 156 PassRefPtrWillBeRawPtr<ExecutionContext> context, | 156 PassRefPtrWillBeRawPtr<ExecutionContext> context, |
| 157 FileSystemType type, | 157 FileSystemType type, |
| 158 CallbackWrapper* callbacks) | 158 CallbackWrapper* callbacks) |
| 159 { | 159 { |
| 160 if (!fileSystem()) { | 160 if (!fileSystem()) { |
| 161 fileSystemNotAvailable(context, callbacks); | 161 fileSystemNotAvailable(context, callbacks); |
| 162 return; | 162 return; |
| 163 } | 163 } |
| 164 | 164 |
| 165 KURL storagePartition = KURL(KURL(), context->securityOrigin()->toString()); | 165 KURL storagePartition = KURL(KURL(), context->getSecurityOrigin()->toString(
)); |
| 166 fileSystem()->openFileSystem(storagePartition, static_cast<WebFileSystemType
>(type), callbacks->release()); | 166 fileSystem()->openFileSystem(storagePartition, static_cast<WebFileSystemType
>(type), callbacks->release()); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void LocalFileSystem::resolveURLInternal( | 169 void LocalFileSystem::resolveURLInternal( |
| 170 PassRefPtrWillBeRawPtr<ExecutionContext> context, | 170 PassRefPtrWillBeRawPtr<ExecutionContext> context, |
| 171 const KURL& fileSystemURL, | 171 const KURL& fileSystemURL, |
| 172 CallbackWrapper* callbacks) | 172 CallbackWrapper* callbacks) |
| 173 { | 173 { |
| 174 if (!fileSystem()) { | 174 if (!fileSystem()) { |
| 175 fileSystemNotAvailable(context, callbacks); | 175 fileSystemNotAvailable(context, callbacks); |
| 176 return; | 176 return; |
| 177 } | 177 } |
| 178 fileSystem()->resolveURL(fileSystemURL, callbacks->release()); | 178 fileSystem()->resolveURL(fileSystemURL, callbacks->release()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void LocalFileSystem::deleteFileSystemInternal( | 181 void LocalFileSystem::deleteFileSystemInternal( |
| 182 PassRefPtrWillBeRawPtr<ExecutionContext> context, | 182 PassRefPtrWillBeRawPtr<ExecutionContext> context, |
| 183 FileSystemType type, | 183 FileSystemType type, |
| 184 CallbackWrapper* callbacks) | 184 CallbackWrapper* callbacks) |
| 185 { | 185 { |
| 186 if (!fileSystem()) { | 186 if (!fileSystem()) { |
| 187 fileSystemNotAvailable(context, callbacks); | 187 fileSystemNotAvailable(context, callbacks); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 KURL storagePartition = KURL(KURL(), context->securityOrigin()->toString()); | 190 KURL storagePartition = KURL(KURL(), context->getSecurityOrigin()->toString(
)); |
| 191 fileSystem()->deleteFileSystem(storagePartition, static_cast<WebFileSystemTy
pe>(type), callbacks->release()); | 191 fileSystem()->deleteFileSystem(storagePartition, static_cast<WebFileSystemTy
pe>(type), callbacks->release()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 LocalFileSystem::LocalFileSystem(PassOwnPtr<FileSystemClient> client) | 194 LocalFileSystem::LocalFileSystem(PassOwnPtr<FileSystemClient> client) |
| 195 : m_client(client) | 195 : m_client(client) |
| 196 { | 196 { |
| 197 } | 197 } |
| 198 | 198 |
| 199 const char* LocalFileSystem::supplementName() | 199 const char* LocalFileSystem::supplementName() |
| 200 { | 200 { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 215 { | 215 { |
| 216 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::
create(client)); | 216 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::
create(client)); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste
mClient> client) | 219 void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSyste
mClient> client) |
| 220 { | 220 { |
| 221 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste
m::create(client)); | 221 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste
m::create(client)); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace blink | 224 } // namespace blink |
| OLD | NEW |