From 48a1fa413d6f765aae27b60f5476b1aefe59a8b5 Mon Sep 17 00:00:00 2001 From: "jianli@chromium.org" Date: Mon, 28 Sep 2009 23:56:42 +0000 Subject: [PATCH] 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 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 | 13 +++++++++++++ WebCore/platform/FileSystem.h | 4 ---- WebCore/platform/chromium/DragDataChromium.cpp | 7 ++++--- WebCore/platform/chromium/FileSystemChromium.cpp | 15 --------------- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 9d9b537..6384b7a 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2009-09-28 Jian Li + + 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 Reviewed by Dimitri Glazkov. diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h index 110204b..958eb73 100644 --- a/WebCore/platform/FileSystem.h +++ b/WebCore/platform/FileSystem.h @@ -49,7 +49,6 @@ #include #include -#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 diff --git a/WebCore/platform/chromium/DragDataChromium.cpp b/WebCore/platform/chromium/DragDataChromium.cpp index 4083b80..133ba24 100644 --- a/WebCore/platform/chromium/DragDataChromium.cpp +++ b/WebCore/platform/chromium/DragDataChromium.cpp @@ -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 diff --git a/WebCore/platform/chromium/FileSystemChromium.cpp b/WebCore/platform/chromium/FileSystemChromium.cpp index 9e7424d..30674d9 100644 --- a/WebCore/platform/chromium/FileSystemChromium.cpp +++ b/WebCore/platform/chromium/FileSystemChromium.cpp @@ -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 -- 1.8.3.1