| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 WebFileSystem* LocalFileSystem::fileSystem() const | 116 WebFileSystem* LocalFileSystem::fileSystem() const |
| 117 { | 117 { |
| 118 Platform* platform = Platform::current(); | 118 Platform* platform = Platform::current(); |
| 119 if (!platform) | 119 if (!platform) |
| 120 return nullptr; | 120 return nullptr; |
| 121 return Platform::current()->fileSystem(); | 121 return Platform::current()->fileSystem(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void LocalFileSystem::requestFileSystemAccessInternal(ExecutionContext* context,
PassOwnPtr<Closure> allowed, PassOwnPtr<Closure> denied) | 124 void LocalFileSystem::requestFileSystemAccessInternal(ExecutionContext* context,
PassOwnPtr<SameThreadClosure> allowed, PassOwnPtr<SameThreadClosure> denied) |
| 125 { | 125 { |
| 126 if (!client()) { | 126 if (!client()) { |
| 127 (*denied)(); | 127 (*denied)(); |
| 128 return; | 128 return; |
| 129 } | 129 } |
| 130 if (!context->isDocument()) { | 130 if (!context->isDocument()) { |
| 131 if (!client()->requestFileSystemAccessSync(context)) { | 131 if (!client()->requestFileSystemAccessSync(context)) { |
| 132 (*denied)(); | 132 (*denied)(); |
| 133 return; | 133 return; |
| 134 } | 134 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |