Changeset 116273 in webkit


Ignore:
Timestamp:
May 6, 2012 10:33:34 PM (12 years ago)
Author:
kinuko@chromium.org
Message:

Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
https://bugs.webkit.org/show_bug.cgi?id=85736

Change the return type of Entry::toURL() from String to KURL.

Reviewed by David Levin.

No new tests as this change should not have any visible impact in the javascript layer.

Source/WebCore:

  • Modules/filesystem/EntryBase.cpp:

(WebCore::EntryBase::toURL):

  • Modules/filesystem/EntryBase.h:
  • platform/AsyncFileSystem.h:
  • platform/blackberry/AsyncFileSystemBlackberry.cpp:

(AsyncFileSystemBlackberry::toURL):

  • platform/blackberry/AsyncFileSystemBlackberry.h:
  • platform/gtk/AsyncFileSystemGtk.cpp:

(AsyncFileSystemGtk::toURL):

  • platform/gtk/AsyncFileSystemGtk.h:

Souce/We/chromium:

  • src/AsyncFileSystemChromium.cpp:

(WebCore::AsyncFileSystemChromium::toURL):
String to KURL.

  • src/AsyncFileSystemChromium.h:

(AsyncFileSystemChromium):

Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116269 r116273  
     12012-05-06  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
     4        https://bugs.webkit.org/show_bug.cgi?id=85736
     5
     6        Change the return type of Entry::toURL() from String to KURL.
     7
     8        Reviewed by David Levin.
     9
     10        No new tests as this change should not have any visible impact in the javascript layer.
     11
     12        * Modules/filesystem/EntryBase.cpp:
     13        (WebCore::EntryBase::toURL):
     14        * Modules/filesystem/EntryBase.h:
     15        * platform/AsyncFileSystem.h:
     16        * platform/blackberry/AsyncFileSystemBlackberry.cpp:
     17        (AsyncFileSystemBlackberry::toURL):
     18        * platform/blackberry/AsyncFileSystemBlackberry.h:
     19        * platform/gtk/AsyncFileSystemGtk.cpp:
     20        (AsyncFileSystemGtk::toURL):
     21        * platform/gtk/AsyncFileSystemGtk.h:
     22
    1232012-05-06  Kentaro Hara  <haraken@chromium.org>
    224
  • trunk/Source/WebCore/Modules/filesystem/EntryBase.cpp

    r111075 r116273  
    5555}
    5656
    57 String EntryBase::toURL()
     57KURL EntryBase::toURL() const
    5858{
    5959    return m_fileSystem->asyncFileSystem()->toURL(m_fileSystem->securityOrigin()->toString(), m_fullPath);
  • trunk/Source/WebCore/Modules/filesystem/EntryBase.h

    r111075 r116273  
    3434#if ENABLE(FILE_SYSTEM)
    3535
    36 #include "PlatformString.h"
     36#include "KURL.h"
    3737#include <wtf/PassRefPtr.h>
    3838#include <wtf/RefCounted.h>
     
    5656    const String& name() const { return m_name; }
    5757
    58     String toURL();
     58    KURL toURL() const;
    5959
    6060protected:
  • trunk/Source/WebCore/platform/AsyncFileSystem.h

    r109324 r116273  
    7373    static bool crackFileSystemURL(const KURL&, Type&, String& filePath);
    7474
    75     virtual String toURL(const String& originString, const String& fullPath) = 0;
     75    virtual KURL toURL(const String& originString, const String& fullPath) const = 0;
    7676
    7777    // Subclass must implement this if it supports synchronous operations.
  • trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp

    r112106 r116273  
    8181}
    8282
    83 String AsyncFileSystemBlackBerry::toURL(const String& originString, const String& fullPath)
     83KURL AsyncFileSystemBlackBerry::toURL(const String& originString, const String& fullPath) const
    8484{
    8585    UNUSED_PARAM(originString);
     
    8787
    8888    notImplemented();
    89     return String();
     89    return KURL();
    9090}
    9191
  • trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h

    r112106 r116273  
    3030    AsyncFileSystemBlackBerry(AsyncFileSystem::Type);
    3131    virtual ~AsyncFileSystemBlackBerry();
    32     virtual String toURL(const String& originString, const String& fullPath);
     32    virtual KURL toURL(const String& originString, const String& fullPath) const;
    3333    virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
    3434    virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
  • trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp

    r107986 r116273  
    7070}
    7171
    72 String AsyncFileSystemGtk::toURL(const String& originString, const String& fullPath)
     72KURL AsyncFileSystemGtk::toURL(const String& originString, const String& fullPath) const
    7373{
    7474    notImplemented();
    75     return String();
     75    return KURL();
    7676}
    7777
  • trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h

    r107986 r116273  
    3535    virtual ~AsyncFileSystemGtk();
    3636
    37     virtual String toURL(const String& originString, const String& fullPath);
     37    virtual KURL toURL(const String& originString, const String& fullPath) const;
    3838    virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
    3939    virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
  • trunk/Source/WebKit/chromium/ChangeLog

    r116270 r116273  
     12012-05-06  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
     4        https://bugs.webkit.org/show_bug.cgi?id=85736
     5
     6        Reviewed by David Levin.
     7
     8        Change AsyncFileSystemChromium::toURL()'s return type from String to KURL.
     9
     10        * src/AsyncFileSystemChromium.cpp:
     11        (WebCore::AsyncFileSystemChromium::toURL):
     12        String to KURL.
     13        * src/AsyncFileSystemChromium.h:
     14        (AsyncFileSystemChromium):
     15
    1162012-05-06  Mark Pilgrim  <pilgrim@chromium.org>
    217
  • trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp

    r112510 r116273  
    199199}
    200200
    201 String AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath)
     201KURL AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath) const
    202202{
    203203    ASSERT(!originString.isEmpty());
    204204    if (originString == "null")
    205         return String();
     205        return KURL();
    206206
    207207    // For now we don't support toURL for isolated filesystem (until we resolve the isolated filesystem lifetime issue).
    208208    if (type() == isolatedType)
    209         return String();
     209        return KURL();
    210210
    211211    if (type() == externalType) {
     
    217217        result.append(externalPathPrefix);
    218218        result.append(encodeWithURLEscapeSequences(fullPath));
    219         return result.toString();
     219        return KURL(ParsedURLString, result.toString());
    220220    }
    221221
    222222    // For regular types we can just call virtualPathToFileSystemURL which appends the fullPath to the m_filesystemRootURL that should look like 'filesystem:<origin>/<typePrefix>'.
    223223    ASSERT(SecurityOrigin::create(m_filesystemRootURL)->toString() == originString);
    224     return virtualPathToFileSystemURL(fullPath);
     224    return KURL(ParsedURLString, virtualPathToFileSystemURL(fullPath));
    225225}
    226226
  • trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h

    r112510 r116273  
    5858    virtual ~AsyncFileSystemChromium();
    5959
    60     virtual String toURL(const String& originString, const String& fullPath);
     60    virtual KURL toURL(const String& originString, const String& fullPath) const;
    6161    virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
    6262    virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
Note: See TracChangeset for help on using the changeset viewer.