Title: [116273] trunk/Source
Revision
116273
Author
[email protected]
Date
2012-05-06 22:33:34 -0700 (Sun, 06 May 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (116272 => 116273)


--- trunk/Source/WebCore/ChangeLog	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/ChangeLog	2012-05-07 05:33:34 UTC (rev 116273)
@@ -1,3 +1,25 @@
+2012-05-06  Kinuko Yasuda  <[email protected]>
+
+        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.
+
+        * 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:
+
 2012-05-06  Kentaro Hara  <[email protected]>
 
         [V8][Performance] Remove Isolate lookup from the call path

Modified: trunk/Source/WebCore/Modules/filesystem/EntryBase.cpp (116272 => 116273)


--- trunk/Source/WebCore/Modules/filesystem/EntryBase.cpp	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/Modules/filesystem/EntryBase.cpp	2012-05-07 05:33:34 UTC (rev 116273)
@@ -54,7 +54,7 @@
 {
 }
 
-String EntryBase::toURL()
+KURL EntryBase::toURL() const
 {
     return m_fileSystem->asyncFileSystem()->toURL(m_fileSystem->securityOrigin()->toString(), m_fullPath);
 }

Modified: trunk/Source/WebCore/Modules/filesystem/EntryBase.h (116272 => 116273)


--- trunk/Source/WebCore/Modules/filesystem/EntryBase.h	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/Modules/filesystem/EntryBase.h	2012-05-07 05:33:34 UTC (rev 116273)
@@ -33,7 +33,7 @@
 
 #if ENABLE(FILE_SYSTEM)
 
-#include "PlatformString.h"
+#include "KURL.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -55,7 +55,7 @@
     const String& fullPath() const { return m_fullPath; }
     const String& name() const { return m_name; }
 
-    String toURL();
+    KURL toURL() const;
 
 protected:
     EntryBase(PassRefPtr<DOMFileSystemBase>, const String& fullPath);

Modified: trunk/Source/WebCore/platform/AsyncFileSystem.h (116272 => 116273)


--- trunk/Source/WebCore/platform/AsyncFileSystem.h	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/platform/AsyncFileSystem.h	2012-05-07 05:33:34 UTC (rev 116273)
@@ -72,7 +72,7 @@
 
     static bool crackFileSystemURL(const KURL&, Type&, String& filePath);
 
-    virtual String toURL(const String& originString, const String& fullPath) = 0;
+    virtual KURL toURL(const String& originString, const String& fullPath) const = 0;
 
     // Subclass must implement this if it supports synchronous operations.
     // This should return false if there are no pending operations.

Modified: trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp (116272 => 116273)


--- trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp	2012-05-07 05:33:34 UTC (rev 116273)
@@ -80,13 +80,13 @@
     notImplemented();
 }
 
-String AsyncFileSystemBlackBerry::toURL(const String& originString, const String& fullPath)
+KURL AsyncFileSystemBlackBerry::toURL(const String& originString, const String& fullPath) const
 {
     UNUSED_PARAM(originString);
     UNUSED_PARAM(fullPath);
 
     notImplemented();
-    return String();
+    return KURL();
 }
 
 void AsyncFileSystemBlackBerry::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)

Modified: trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h (116272 => 116273)


--- trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h	2012-05-07 05:33:34 UTC (rev 116273)
@@ -29,7 +29,7 @@
 public:
     AsyncFileSystemBlackBerry(AsyncFileSystem::Type);
     virtual ~AsyncFileSystemBlackBerry();
-    virtual String toURL(const String& originString, const String& fullPath);
+    virtual KURL toURL(const String& originString, const String& fullPath) const;
     virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);

Modified: trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp (116272 => 116273)


--- trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp	2012-05-07 05:33:34 UTC (rev 116273)
@@ -69,10 +69,10 @@
     notImplemented();
 }
 
-String AsyncFileSystemGtk::toURL(const String& originString, const String& fullPath)
+KURL AsyncFileSystemGtk::toURL(const String& originString, const String& fullPath) const
 {
     notImplemented();
-    return String();
+    return KURL();
 }
 
 void AsyncFileSystemGtk::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)

Modified: trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h (116272 => 116273)


--- trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h	2012-05-07 05:33:34 UTC (rev 116273)
@@ -34,7 +34,7 @@
     AsyncFileSystemGtk(AsyncFileSystem::Type);
     virtual ~AsyncFileSystemGtk();
 
-    virtual String toURL(const String& originString, const String& fullPath);
+    virtual KURL toURL(const String& originString, const String& fullPath) const;
     virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);

Modified: trunk/Source/WebKit/chromium/ChangeLog (116272 => 116273)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-07 05:33:34 UTC (rev 116273)
@@ -1,3 +1,18 @@
+2012-05-06  Kinuko Yasuda  <[email protected]>
+
+        Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
+        https://bugs.webkit.org/show_bug.cgi?id=85736
+
+        Reviewed by David Levin.
+
+        Change AsyncFileSystemChromium::toURL()'s return type from String to KURL.
+
+        * src/AsyncFileSystemChromium.cpp:
+        (WebCore::AsyncFileSystemChromium::toURL):
+        String to KURL.
+        * src/AsyncFileSystemChromium.h:
+        (AsyncFileSystemChromium):
+
 2012-05-06  Mark Pilgrim  <[email protected]>
 
         [Chromium] Call currentThread through Platform.h directly

Modified: trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp (116272 => 116273)


--- trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp	2012-05-07 05:33:34 UTC (rev 116273)
@@ -198,15 +198,15 @@
 {
 }
 
-String AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath)
+KURL AsyncFileSystemChromium::toURL(const String& originString, const String& fullPath) const
 {
     ASSERT(!originString.isEmpty());
     if (originString == "null")
-        return String();
+        return KURL();
 
     // For now we don't support toURL for isolated filesystem (until we resolve the isolated filesystem lifetime issue).
     if (type() == isolatedType)
-        return String();
+        return KURL();
 
     if (type() == externalType) {
         // For external filesystem originString could be different from what we have in m_filesystemRootURL.
@@ -216,12 +216,12 @@
         result.append("/");
         result.append(externalPathPrefix);
         result.append(encodeWithURLEscapeSequences(fullPath));
-        return result.toString();
+        return KURL(ParsedURLString, result.toString());
     }
 
     // For regular types we can just call virtualPathToFileSystemURL which appends the fullPath to the m_filesystemRootURL that should look like 'filesystem:<origin>/<typePrefix>'.
     ASSERT(SecurityOrigin::create(m_filesystemRootURL)->toString() == originString);
-    return virtualPathToFileSystemURL(fullPath);
+    return KURL(ParsedURLString, virtualPathToFileSystemURL(fullPath));
 }
 
 void AsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)

Modified: trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h (116272 => 116273)


--- trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h	2012-05-07 05:24:03 UTC (rev 116272)
+++ trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h	2012-05-07 05:33:34 UTC (rev 116273)
@@ -57,7 +57,7 @@
 
     virtual ~AsyncFileSystemChromium();
 
-    virtual String toURL(const String& originString, const String& fullPath);
+    virtual KURL toURL(const String& originString, const String& fullPath) const;
     virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
     virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to