Changeset 78362 in webkit


Ignore:
Timestamp:
Feb 11, 2011 1:39:04 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-11 Adam Klein <adamk@chromium.org>

Reviewed by Darin Fisher.

[fileapi] Add support for filesystem: URI handling
https://bugs.webkit.org/show_bug.cgi?id=53529

Tests for filesystem: URIs, testing both their security origin
properties and the existence of the Entry.toURI method.

  • fast/filesystem/directory-entry-to-uri-expected.txt: Added.
  • fast/filesystem/directory-entry-to-uri.html: Added.
  • fast/filesystem/file-entry-to-uri-expected.txt: Added.
  • fast/filesystem/file-entry-to-uri.html: Added.
  • fast/filesystem/filesystem-uri-origin-expected.txt: Added.
  • fast/filesystem/filesystem-uri-origin.html: Added.
  • fast/filesystem/resources/directory-entry-to-uri.js: Added. (errorCallback): (entryToURI): (createTestDirectory): ():
  • fast/filesystem/resources/file-entry-to-uri.js: Added. (errorCallback): (entryToURI): (createTestFile): ():
  • http/tests/security/filesystem-iframe-from-remote-expected.txt: Added.
  • http/tests/security/filesystem-iframe-from-remote.html: Added.
  • http/tests/security/resources/create-filesystem-file.html: Added.

2011-02-11 Adam Klein <adamk@chromium.org>

Reviewed by Darin Fisher.

[fileapi] Add support for filesystem: URI handling
https://bugs.webkit.org/show_bug.cgi?id=53529

There are two major parts to this patch: one is to add an
implementation of Entry.toURI to the FileSystem API.
The other is to implement security origin checking for this
new scheme.

All changes are guarded by the FILE_SYSTEM feature. An accompanying
Chromium change, to support loading of filesystem: URIs, has recently
been submitted as Chromium r74082.

Spec:

http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#methods-2

Proposed URI format, and discussion of security origin issues:

http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0218.html

Tests: fast/filesystem/directory-entry-to-uri.html

fast/filesystem/file-entry-to-uri.html
fast/filesystem/filesystem-uri-origin.html
http/tests/security/filesystem-iframe-from-remote.html

  • fileapi/Entry.cpp: (WebCore::Entry::toURI):
  • fileapi/Entry.h:
  • fileapi/Entry.idl:
  • Added toURI method to the IDL, omitting the MIME type argument specified in the spec as it will soon be removed.
  • page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::SecurityOrigin):
  • crack the filesystem: URI to get at the origin of the site (WebCore::SecurityOrigin::canDisplay):
  • canDisplay for filesystem: URIs is equivalent to canRequest
  • platform/AsyncFileSystem.cpp: (WebCore::AsyncFileSystem::create): (WebCore::AsyncFileSystem::openFileSystem):
  • platform/AsyncFileSystem.h: (WebCore::AsyncFileSystem::type):
  • Exposed filesystem type to allow toURI to use it as part of the path. (WebCore::AsyncFileSystem::AsyncFileSystem):
  • platform/SchemeRegistry.cpp: (WebCore::canDisplayOnlyIfCanRequestSchemes): (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
  • Generalized canDisplayOnlyIfCanRequest as it applies to both filesystem: and blob: URIs.
  • platform/SchemeRegistry.h:

2011-02-11 Adam Klein <adamk@chromium.org>

Reviewed by Darin Fisher.

[fileapi] Add support for filesystem: URI handling
https://bugs.webkit.org/show_bug.cgi?id=53529

Changes to Chromium WebKit API required to expose
the FileSystem type to WebCore's fileapi code, since the
type is part of the filesystem URI.

  • src/AsyncFileSystemChromium.cpp: (WebCore::AsyncFileSystemChromium::AsyncFileSystemChromium):
  • src/AsyncFileSystemChromium.h: (WebCore::AsyncFileSystemChromium::create):
  • src/LocalFileSystemChromium.cpp: (WebCore::LocalFileSystem::readFileSystem): (WebCore::LocalFileSystem::requestFileSystem):
  • src/WebFileSystemCallbacksImpl.cpp: (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem):
  • src/WebFileSystemCallbacksImpl.h:
  • src/WorkerAsyncFileSystemChromium.cpp: (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
  • src/WorkerAsyncFileSystemChromium.h: (WebCore::WorkerAsyncFileSystemChromium::create):
Location:
trunk
Files:
11 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r78359 r78362  
     12011-02-11  Adam Klein  <adamk@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [fileapi] Add support for filesystem: URI handling
     6        https://bugs.webkit.org/show_bug.cgi?id=53529
     7
     8        Tests for filesystem: URIs, testing both their security origin
     9        properties and the existence of the Entry.toURI method.
     10
     11        * fast/filesystem/directory-entry-to-uri-expected.txt: Added.
     12        * fast/filesystem/directory-entry-to-uri.html: Added.
     13        * fast/filesystem/file-entry-to-uri-expected.txt: Added.
     14        * fast/filesystem/file-entry-to-uri.html: Added.
     15        * fast/filesystem/filesystem-uri-origin-expected.txt: Added.
     16        * fast/filesystem/filesystem-uri-origin.html: Added.
     17        * fast/filesystem/resources/directory-entry-to-uri.js: Added.
     18        (errorCallback):
     19        (entryToURI):
     20        (createTestDirectory):
     21        ():
     22        * fast/filesystem/resources/file-entry-to-uri.js: Added.
     23        (errorCallback):
     24        (entryToURI):
     25        (createTestFile):
     26        ():
     27        * http/tests/security/filesystem-iframe-from-remote-expected.txt: Added.
     28        * http/tests/security/filesystem-iframe-from-remote.html: Added.
     29        * http/tests/security/resources/create-filesystem-file.html: Added.
     30
    1312011-02-11  Sailesh Agrawal  <sail@chromium.org>
    232
  • trunk/LayoutTests/platform/gtk/Skipped

    r78358 r78362  
    24812481fast/filesystem
    24822482http/tests/local/fileapi
     2483http/tests/security/filesystem-iframe-from-remote.html
    24832484
    24842485# Needs more investigation like QT
  • trunk/LayoutTests/platform/mac/Skipped

    r78095 r78362  
    258258# FileSystem API is not supported.
    259259fast/filesystem
     260http/tests/security/filesystem-iframe-from-remote.html
    260261
    261262# https://bugs.webkit.org/show_bug.cgi?id=46223
  • trunk/LayoutTests/platform/qt/Skipped

    r78256 r78362  
    49114911# FileSystem API is not supported.
    49124912fast/filesystem
     4913http/tests/security/filesystem-iframe-from-remote.html
    49134914
    49144915# It fails, because 3D canvas is disabled by default.
  • trunk/LayoutTests/platform/win/Skipped

    r78095 r78362  
    10921092# FileSystem API is not supported.
    10931093fast/filesystem
     1094http/tests/security/filesystem-iframe-from-remote.html
    10941095
    10951096# LayoutTestController::nodesFromRect is not supported.
  • trunk/Source/WebCore/ChangeLog

    r78361 r78362  
     12011-02-11  Adam Klein  <adamk@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [fileapi] Add support for filesystem: URI handling
     6        https://bugs.webkit.org/show_bug.cgi?id=53529
     7
     8        There are two major parts to this patch: one is to add an
     9        implementation of Entry.toURI to the FileSystem API.
     10        The other is to implement security origin checking for this
     11        new scheme.
     12
     13        All changes are guarded by the FILE_SYSTEM feature. An accompanying
     14        Chromium change, to support loading of filesystem: URIs, has recently
     15        been submitted as Chromium r74082.
     16
     17        Spec:
     18          http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#methods-2
     19        Proposed URI format, and discussion of security origin issues:
     20          http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0218.html
     21
     22        Tests: fast/filesystem/directory-entry-to-uri.html
     23               fast/filesystem/file-entry-to-uri.html
     24               fast/filesystem/filesystem-uri-origin.html
     25               http/tests/security/filesystem-iframe-from-remote.html
     26
     27        * fileapi/Entry.cpp:
     28        (WebCore::Entry::toURI):
     29        * fileapi/Entry.h:
     30        * fileapi/Entry.idl:
     31        - Added toURI method to the IDL, omitting the MIME type argument
     32          specified in the spec as it will soon be removed.
     33        * page/SecurityOrigin.cpp:
     34        (WebCore::SecurityOrigin::SecurityOrigin):
     35        - crack the filesystem: URI to get at the origin of the site
     36        (WebCore::SecurityOrigin::canDisplay):
     37        - canDisplay for filesystem: URIs is equivalent to canRequest
     38        * platform/AsyncFileSystem.cpp:
     39        (WebCore::AsyncFileSystem::create):
     40        (WebCore::AsyncFileSystem::openFileSystem):
     41        * platform/AsyncFileSystem.h:
     42        (WebCore::AsyncFileSystem::type):
     43        - Exposed filesystem type to allow toURI to use it as part of the
     44          path.
     45        (WebCore::AsyncFileSystem::AsyncFileSystem):
     46        * platform/SchemeRegistry.cpp:
     47        (WebCore::canDisplayOnlyIfCanRequestSchemes):
     48        (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest):
     49        (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
     50        - Generalized canDisplayOnlyIfCanRequest as it applies to both
     51          filesystem: and blob: URIs.
     52        * platform/SchemeRegistry.h:
     53
    1542011-02-11  Beth Dakin  <bdakin@apple.com>
    255
  • trunk/Source/WebCore/fileapi/Entry.cpp

    r70741 r78362  
    3333#if ENABLE(FILE_SYSTEM)
    3434
     35#include "AsyncFileSystem.h"
    3536#include "DirectoryEntry.h"
    3637#include "EntryCallback.h"
     
    3940#include "FileSystemCallbacks.h"
    4041#include "MetadataCallback.h"
     42#include "ScriptExecutionContext.h"
     43#include "SecurityOrigin.h"
    4144#include "VoidCallback.h"
     45#include <wtf/text/StringBuilder.h>
    4246
    4347namespace WebCore {
     
    8387}
    8488
    85 String Entry::toURI(const String&)
     89String Entry::toURI()
    8690{
    87     // FIXME: to be implemented.
    88     ASSERT_NOT_REACHED();
    89     return String();
     91    StringBuilder uriBuilder;
     92    uriBuilder.append("filesystem:");
     93    uriBuilder.append(filesystem()->scriptExecutionContext()->securityOrigin()->toString());
     94    uriBuilder.append("/");
     95    uriBuilder.append(m_fileSystem->asyncFileSystem()->type() == AsyncFileSystem::Temporary ? "temporary" : "persistent");
     96    uriBuilder.append(m_fullPath);
     97    return uriBuilder.toString();
    9098}
    9199
  • trunk/Source/WebCore/fileapi/Entry.h

    r70741 r78362  
    5858    void getParent(PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
    5959
    60     String toURI(const String& mimeType = String());
     60    String toURI();
    6161
    6262protected:
  • trunk/Source/WebCore/fileapi/Entry.idl

    r69249 r78362  
    4444        void moveTo(in DirectoryEntry parent, in [Optional, ConvertUndefinedOrNullToNullString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
    4545        void copyTo(in DirectoryEntry parent, in [Optional, ConvertUndefinedOrNullToNullString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
     46        DOMString toURI();
    4647        void remove(in [Optional, Callback] VoidCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
    4748        void getParent(in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r77272 r78362  
    8080        m_protocol = "";
    8181
     82#if ENABLE(FILE_SYSTEM)
     83    if (m_protocol == "filesystem") {
     84        KURL originURL(ParsedURLString, url.path());
     85        if (originURL.isValid()) {
     86            m_protocol = originURL.protocol().lower();
     87            m_host = originURL.host().lower();
     88            m_port = originURL.port();
     89        } else
     90            m_isUnique = true;
     91    }
     92#endif
     93
    8294    // For edge case URLs that were probably misparsed, make sure that the origin is unique.
    8395    if (schemeRequiresAuthority(m_protocol) && m_host.isEmpty())
     
    314326    String protocol = url.protocol().lower();
    315327
    316 #if ENABLE(BLOB)
    317     // FIXME: We should generalize this check.
    318     if (protocol == BlobURL::blobProtocol())
     328    if (SchemeRegistry::canDisplayOnlyIfCanRequest(protocol))
    319329        return canRequest(url);
    320 #endif
    321330
    322331    if (SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated(protocol))
  • trunk/Source/WebCore/platform/AsyncFileSystem.cpp

    r71206 r78362  
    4747}
    4848
    49 PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(const String&)
     49PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(Type, const String&)
    5050{
    5151    notImplemented();
     
    6969    rootPath.append(PlatformFilePathSeparator);
    7070
    71     callbacks->didOpenFileSystem(name, AsyncFileSystem::create(rootPath));
     71    callbacks->didOpenFileSystem(name, AsyncFileSystem::create(type, rootPath));
    7272}
    7373#endif
  • trunk/Source/WebCore/platform/AsyncFileSystem.h

    r76248 r78362  
    6666
    6767    // Creates and returns a new platform-specific AsyncFileSystem instance if the platform has its own implementation.
    68     static PassOwnPtr<AsyncFileSystem> create(const String& rootPath);
     68    static PassOwnPtr<AsyncFileSystem> create(Type, const String& rootPath);
    6969
    7070    // Opens a new file system. The create parameter specifies whether or not to create the path if it does not already exists.
     
    133133    String root() const { return m_platformRootPath; }
    134134
     135    Type type() const { return m_type; }
     136
    135137protected:
    136     AsyncFileSystem(const String& platformRootPath)
    137         : m_platformRootPath(platformRootPath)
     138    AsyncFileSystem(Type type, const String& platformRootPath)
     139        : m_type(type)
     140        , m_platformRootPath(platformRootPath)
    138141    {
    139142    }
    140143
     144    Type m_type;
    141145    String m_platformRootPath;
    142146};
  • trunk/Source/WebCore/platform/SchemeRegistry.cpp

    r76637 r78362  
    8787}
    8888
     89static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes()
     90{
     91    DEFINE_STATIC_LOCAL(URLSchemesMap, canDisplayOnlyIfCanRequestSchemes, ());
     92
     93#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
     94    if (canDisplayOnlyIfCanRequestSchemes.isEmpty()) {
     95#if ENABLE(BLOB)
     96        canDisplayOnlyIfCanRequestSchemes.add("blob");
     97#endif
     98#if ENABLE(FILE_SYSTEM)
     99        canDisplayOnlyIfCanRequestSchemes.add("filesystem");
     100#endif
     101    }
     102#endif // ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
     103
     104    return canDisplayOnlyIfCanRequestSchemes;
     105}
     106
    89107void SchemeRegistry::registerURLSchemeAsLocal(const String& scheme)
    90108{
     
    157175}
    158176
     177bool SchemeRegistry::canDisplayOnlyIfCanRequest(const String& scheme)
     178{
     179    if (scheme.isEmpty())
     180        return false;
     181    return canDisplayOnlyIfCanRequestSchemes().contains(scheme);
     182}
     183
     184void SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest(const String& scheme)
     185{
     186    canDisplayOnlyIfCanRequestSchemes().add(scheme);
     187}
     188
    159189} // namespace WebCore
  • trunk/Source/WebCore/platform/SchemeRegistry.h

    r75557 r78362  
    5959    static void registerURLSchemeAsEmptyDocument(const String&);
    6060    static bool shouldLoadURLSchemeAsEmptyDocument(const String&);
     61
     62    // Such schemes should delegate to SecurityOrigin::canRequest for any URL
     63    // passed to SecurityOrigin::canDisplay.
     64    static bool canDisplayOnlyIfCanRequest(const String& scheme);
     65    static void registerAsCanDisplayOnlyIfCanRequest(const String& scheme);
    6166};
    6267
  • trunk/Source/WebKit/chromium/ChangeLog

    r78342 r78362  
     12011-02-11  Adam Klein  <adamk@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [fileapi] Add support for filesystem: URI handling
     6        https://bugs.webkit.org/show_bug.cgi?id=53529
     7
     8        Changes to Chromium WebKit API required to expose
     9        the FileSystem type to WebCore's fileapi code, since the
     10        type is part of the filesystem URI.
     11
     12        * src/AsyncFileSystemChromium.cpp:
     13        (WebCore::AsyncFileSystemChromium::AsyncFileSystemChromium):
     14        * src/AsyncFileSystemChromium.h:
     15        (WebCore::AsyncFileSystemChromium::create):
     16        * src/LocalFileSystemChromium.cpp:
     17        (WebCore::LocalFileSystem::readFileSystem):
     18        (WebCore::LocalFileSystem::requestFileSystem):
     19        * src/WebFileSystemCallbacksImpl.cpp:
     20        (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
     21        (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem):
     22        * src/WebFileSystemCallbacksImpl.h:
     23        * src/WorkerAsyncFileSystemChromium.cpp:
     24        (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
     25        * src/WorkerAsyncFileSystemChromium.h:
     26        (WebCore::WorkerAsyncFileSystemChromium::create):
     27
    1282011-02-10  Nate Chapin  <japhet@chromium.org>
    229
  • trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp

    r69485 r78362  
    5151}
    5252
    53 AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath)
    54     : AsyncFileSystem(rootPath)
     53AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, const String& rootPath)
     54    : AsyncFileSystem(type, rootPath)
    5555    , m_webFileSystem(WebKit::webKitClient()->fileSystem())
    5656{
  • trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h

    r69485 r78362  
    4747class AsyncFileSystemChromium : public AsyncFileSystem {
    4848public:
    49     static PassOwnPtr<AsyncFileSystem> create(const String& rootPath)
     49    static PassOwnPtr<AsyncFileSystem> create(AsyncFileSystem::Type type, const String& rootPath)
    5050    {
    51         return adoptPtr(new AsyncFileSystemChromium(rootPath));
     51        return adoptPtr(new AsyncFileSystemChromium(type, rootPath));
    5252    }
    5353
     
    6767
    6868private:
    69     explicit AsyncFileSystemChromium(const String& rootPath);
     69    AsyncFileSystemChromium(AsyncFileSystem::Type, const String& rootPath);
    7070    WebKit::WebFileSystem* m_webFileSystem;
    7171};
  • trunk/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp

    r71206 r78362  
    6363    Document* document = static_cast<Document*>(context);
    6464    WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
    65     webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks));
     65    webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks, type));
    6666}
    6767
     
    7272        Document* document = static_cast<Document*>(context);
    7373        WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
    74         webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks));
     74        webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks, type));
    7575    } else {
    7676        WorkerContext* workerContext = static_cast<WorkerContext*>(context);
    7777        WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy();
    7878        WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy);
    79         webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, context, synchronous), synchronous);
     79        webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, type, context, synchronous), synchronous);
    8080    }
    8181}
  • trunk/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp

    r70745 r78362  
    3737#include "FileMetadata.h"
    3838#include "ScriptExecutionContext.h"
     39#include "WebFileInfo.h"
     40#include "WebFileSystem.h"
    3941#include "WebFileSystemEntry.h"
    40 #include "WebFileInfo.h"
    4142#include "WebString.h"
    4243#include "WorkerAsyncFileSystemChromium.h"
     
    4748namespace WebKit {
    4849
    49 WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WebCore::ScriptExecutionContext* context, bool synchronous)
     50WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, AsyncFileSystem::Type type, WebCore::ScriptExecutionContext* context, bool synchronous)
    5051    : m_callbacks(callbacks)
     52    , m_type(type)
    5153    , m_context(context)
    5254    , m_synchronous(synchronous)
     
    8688{
    8789    if (m_context && m_context->isWorkerContext())
    88         m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, path, m_synchronous));
     90        m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, path, m_synchronous));
    8991    else
    90         m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(path));
     92        m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(m_type, path));
    9193    delete this;
    9294}
  • trunk/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h

    r69249 r78362  
    3232#define WebFileSystemCallbacksImpl_h
    3333
     34#include "AsyncFileSystem.h"
     35#include "WebFileSystem.h"
    3436#include "WebFileSystemCallbacks.h"
    3537#include "WebVector.h"
     
    5052class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
    5153public:
    52     WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
     54    WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::AsyncFileSystem::Type = WebCore::AsyncFileSystem::Temporary, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
    5355    virtual ~WebFileSystemCallbacksImpl();
    5456
     
    6264    OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
    6365
     66    // Used for openFileSystem callbacks.
     67    WebCore::AsyncFileSystem::Type m_type;
     68
    6469    // Used for worker's openFileSystem callbacks.
    6570    WebCore::ScriptExecutionContext* m_context;
  • trunk/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp

    r72200 r78362  
    5757static const char fileSystemOperationsMode[] = "fileSystemOperationsMode";
    5858
    59 WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
    60     : AsyncFileSystem(rootPath)
     59WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)
     60    : AsyncFileSystem(type, rootPath)
    6161    , m_scriptExecutionContext(context)
    6262    , m_webFileSystem(WebKit::webKitClient()->fileSystem())
  • trunk/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h

    r69485 r78362  
    5353class WorkerAsyncFileSystemChromium : public AsyncFileSystem {
    5454public:
    55     static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
     55    static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)
    5656    {
    57         return adoptPtr(new WorkerAsyncFileSystemChromium(context, rootPath, synchronous));
     57        return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, rootPath, synchronous));
    5858    }
    5959
     
    7676
    7777private:
    78     WorkerAsyncFileSystemChromium(ScriptExecutionContext*, const String& rootPath, bool synchronous);
     78    WorkerAsyncFileSystemChromium(ScriptExecutionContext*, AsyncFileSystem::Type, const String& rootPath, bool synchronous);
    7979
    8080    PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>);
Note: See TracChangeset for help on using the changeset viewer.