Do not add platform-specific methods to cross-platform header
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Sep 2009 23:56:42 +0000 (23:56 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Sep 2009 23:56:42 +0000 (23:56 +0000)
FileSystem.h per Darin's feedback for 29109.
https://bugs.webkit.org/show_bug.cgi?id=29830

Reviewed by David Levin.

* platform/FileSystem.h:
* platform/chromium/DragDataChromium.cpp:
(WebCore::DragData::asURL):
* platform/chromium/FileSystemChromium.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48846 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/FileSystem.h
WebCore/platform/chromium/DragDataChromium.cpp
WebCore/platform/chromium/FileSystemChromium.cpp

index 9d9b537..6384b7a 100644 (file)
@@ -1,3 +1,16 @@
+2009-09-28  Jian Li  <jianli@chromium.org>
+
+        Reviewed by David Levin.
+
+        Do not add platform-specific methods to cross-platform header
+        FileSystem.h per Darin's feedback for 29109.
+        https://bugs.webkit.org/show_bug.cgi?id=29830
+
+        * platform/FileSystem.h:
+        * platform/chromium/DragDataChromium.cpp:
+        (WebCore::DragData::asURL):
+        * platform/chromium/FileSystemChromium.cpp:
+
 2009-09-28  Dumitru Daniliuc  <dumi@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 110204b..958eb73 100644 (file)
@@ -49,7 +49,6 @@
 #include <wtf/Platform.h>
 #include <wtf/Vector.h>
 
-#include "KURL.h"
 #include "PlatformString.h"
 
 typedef const struct __CFData* CFDataRef;
@@ -173,9 +172,6 @@ String filenameForDisplay(const String&);
 
 #if PLATFORM(CHROMIUM)
 String pathGetDisplayFileName(const String&);
-String getAbsolutePath(const String&);
-bool isDirectory(const String&);
-KURL filePathToURL(const String&);
 #endif
 
 } // namespace WebCore
index 4083b80..133ba24 100644 (file)
@@ -30,6 +30,7 @@
 #include "config.h"
 #include "DragData.h"
 
+#include "ChromiumBridge.h"
 #include "ChromiumDataObject.h"
 #include "Clipboard.h"
 #include "ClipboardChromium.h"
@@ -67,9 +68,9 @@ String DragData::asURL(String* title) const
         url = m_platformDragData->url.string();
     else if (m_platformDragData->filenames.size() == 1) {
         String fileName = m_platformDragData->filenames[0];
-        fileName = getAbsolutePath(fileName);
-        if (fileExists(fileName) && !isDirectory(fileName))
-            url = filePathToURL(fileName).string();
+        fileName = ChromiumBridge::getAbsolutePath(fileName);
+        if (fileExists(fileName) && !ChromiumBridge::isDirectory(fileName))
+            url = ChromiumBridge::filePathToURL(fileName).string();
     }
  
     // |title| can be NULL
index 9e7424d..30674d9 100644 (file)
@@ -77,19 +77,4 @@ bool fileExists(const String& path)
     return ChromiumBridge::fileExists(path);
 }
 
-String getAbsolutePath(const String& path)
-{
-    return ChromiumBridge::getAbsolutePath(path);
-}
-
-bool isDirectory(const String& path)
-{
-    return ChromiumBridge::isDirectory(path);
-}
-
-KURL filePathToURL(const String& path)
-{
-    return ChromiumBridge::filePathToURL(path);
-}
-
 } // namespace WebCore