summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 19:32:55 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 19:32:55 +0000
commit958a5e8c2cb011eee3b1d85b9bf687cde86194ad (patch)
treef32c779d2cc770adc53176f56edc818a79f29808 /webkit/port
parentf4478650f67db995d17f3d880236f0d4eb5926e8 (diff)
downloadchromium_src-958a5e8c2cb011eee3b1d85b9bf687cde86194ad.zip
chromium_src-958a5e8c2cb011eee3b1d85b9bf687cde86194ad.tar.gz
chromium_src-958a5e8c2cb011eee3b1d85b9bf687cde86194ad.tar.bz2
Remove FileSystemPosix.cpp since it is actually unnecessary. This makes the
Linux port more like the Windows and Mac ports. R=evanm Review URL: http://codereview.chromium.org/14431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/platform/chromium/FileSystemChromiumLinux.cpp39
-rw-r--r--webkit/port/platform/chromium/FileSystemChromiumMac.mm3
-rw-r--r--webkit/port/platform/chromium/FileSystemChromiumWin.cpp5
-rw-r--r--webkit/port/platform/chromium/FileSystemPosix.cpp26
4 files changed, 42 insertions, 31 deletions
diff --git a/webkit/port/platform/chromium/FileSystemChromiumLinux.cpp b/webkit/port/platform/chromium/FileSystemChromiumLinux.cpp
new file mode 100644
index 0000000..e8635dc
--- /dev/null
+++ b/webkit/port/platform/chromium/FileSystemChromiumLinux.cpp
@@ -0,0 +1,39 @@
+// Copyright (c) 2008, Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "config.h"
+#include "FileSystem.h"
+
+namespace WebCore {
+
+String pathGetFileName(const String& path)
+{
+ return path.substring(path.reverseFind('/') + 1);
+}
+
+}
diff --git a/webkit/port/platform/chromium/FileSystemChromiumMac.mm b/webkit/port/platform/chromium/FileSystemChromiumMac.mm
index 152bee2..7733999 100644
--- a/webkit/port/platform/chromium/FileSystemChromiumMac.mm
+++ b/webkit/port/platform/chromium/FileSystemChromiumMac.mm
@@ -1,5 +1,4 @@
-// Copyright (c) 2008, Google Inc.
-// All rights reserved.
+// Copyright (c) 2008, Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
diff --git a/webkit/port/platform/chromium/FileSystemChromiumWin.cpp b/webkit/port/platform/chromium/FileSystemChromiumWin.cpp
index 0c91231..91486e8 100644
--- a/webkit/port/platform/chromium/FileSystemChromiumWin.cpp
+++ b/webkit/port/platform/chromium/FileSystemChromiumWin.cpp
@@ -1,5 +1,4 @@
-// Copyright (c) 2008, Google Inc.
-// All rights reserved.
+// Copyright (c) 2008, Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -40,4 +39,4 @@ String pathGetFileName(const String& path)
return String(PathFindFileName(String(path).charactersWithNullTermination()));
}
-} \ No newline at end of file
+}
diff --git a/webkit/port/platform/chromium/FileSystemPosix.cpp b/webkit/port/platform/chromium/FileSystemPosix.cpp
deleted file mode 100644
index 32069a0..0000000
--- a/webkit/port/platform/chromium/FileSystemPosix.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include <string>
-
-#include "FileSystem.h"
-#include "CString.h"
-
-namespace WebCore {
-
-// This function is tasked with transforming a String to a CString for the
-// underlying operating system. On Linux the kernel doesn't care about the
-// filenames so long as NUL and '/' are respected. UTF8 filenames seem to be
-// pretty common, but are not universal, so this could potentially be different
-// on different systems. Until we figure out how to pick the right encoding,
-// we use UTF8.
-// TODO(evanm) - when we figure out how this works in base, abstract this
-// concept into ChromiumBridge.
-CString fileSystemRepresentation(const String& path) {
- return path.utf8();
-}
-
-}