OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "core/workers/WorkerGlobalScope.h" | 35 #include "core/workers/WorkerGlobalScope.h" |
36 #include "modules/filesystem/DOMFileSystemBase.h" | 36 #include "modules/filesystem/DOMFileSystemBase.h" |
37 #include "modules/filesystem/DirectoryEntrySync.h" | 37 #include "modules/filesystem/DirectoryEntrySync.h" |
38 #include "modules/filesystem/ErrorCallback.h" | 38 #include "modules/filesystem/ErrorCallback.h" |
39 #include "modules/filesystem/FileEntrySync.h" | 39 #include "modules/filesystem/FileEntrySync.h" |
40 #include "modules/filesystem/FileSystemCallback.h" | 40 #include "modules/filesystem/FileSystemCallback.h" |
41 #include "modules/filesystem/FileSystemCallbacks.h" | 41 #include "modules/filesystem/FileSystemCallbacks.h" |
42 #include "modules/filesystem/LocalFileSystem.h" | 42 #include "modules/filesystem/LocalFileSystem.h" |
43 #include "modules/filesystem/SyncCallbackHelper.h" | 43 #include "modules/filesystem/SyncCallbackHelper.h" |
44 #include "platform/FileSystemType.h" | 44 #include "platform/FileSystemType.h" |
45 #include "weborigin/SecurityOrigin.h" | 45 #include "platform/weborigin/SecurityOrigin.h" |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
49 void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(WorkerGlobalScope* wor
ker, int type, long long size, PassRefPtr<FileSystemCallback> successCallback, P
assRefPtr<ErrorCallback> errorCallback) | 49 void WorkerGlobalScopeFileSystem::webkitRequestFileSystem(WorkerGlobalScope* wor
ker, int type, long long size, PassRefPtr<FileSystemCallback> successCallback, P
assRefPtr<ErrorCallback> errorCallback) |
50 { | 50 { |
51 ExecutionContext* secureContext = worker->executionContext(); | 51 ExecutionContext* secureContext = worker->executionContext(); |
52 if (!secureContext->securityOrigin()->canAccessFileSystem()) { | 52 if (!secureContext->securityOrigin()->canAccessFileSystem()) { |
53 DOMFileSystem::scheduleCallback(worker, errorCallback, FileError::create
(FileError::SECURITY_ERR)); | 53 DOMFileSystem::scheduleCallback(worker, errorCallback, FileError::create
(FileError::SECURITY_ERR)); |
54 return; | 54 return; |
55 } | 55 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 RefPtr<EntrySync> entry = resolveURLHelper.getResult(es); | 125 RefPtr<EntrySync> entry = resolveURLHelper.getResult(es); |
126 if (!entry) | 126 if (!entry) |
127 return 0; | 127 return 0; |
128 return entry.release(); | 128 return entry.release(); |
129 } | 129 } |
130 | 130 |
131 COMPILE_ASSERT(static_cast<int>(WorkerGlobalScopeFileSystem::TEMPORARY) == stati
c_cast<int>(FileSystemTypeTemporary), enum_mismatch); | 131 COMPILE_ASSERT(static_cast<int>(WorkerGlobalScopeFileSystem::TEMPORARY) == stati
c_cast<int>(FileSystemTypeTemporary), enum_mismatch); |
132 COMPILE_ASSERT(static_cast<int>(WorkerGlobalScopeFileSystem::PERSISTENT) == stat
ic_cast<int>(FileSystemTypePersistent), enum_mismatch); | 132 COMPILE_ASSERT(static_cast<int>(WorkerGlobalScopeFileSystem::PERSISTENT) == stat
ic_cast<int>(FileSystemTypePersistent), enum_mismatch); |
133 | 133 |
134 } // namespace WebCore | 134 } // namespace WebCore |
OLD | NEW |