Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2531)

Unified Diff: base/file_util_posix.cc

Issue 654009: Deprecate GetDirectoryFromPath on non-Windows. (Closed)
Patch Set: with comment Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_deprecated.h ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 590b94dce32e9db68177b5a24d8ff3403fa2ef07..c6069e67061fb89e16b49440c1c24fe29e706c41 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -60,18 +60,6 @@ static const char* kTempFileName = "com.google.chrome.XXXXXX";
static const char* kTempFileName = "org.chromium.XXXXXX";
#endif
-std::wstring GetDirectoryFromPath(const std::wstring& path) {
- if (EndsWithSeparator(path)) {
- return FilePath::FromWStringHack(path)
- .StripTrailingSeparators()
- .ToWStringHack();
- } else {
- char full_path[PATH_MAX];
- base::strlcpy(full_path, WideToUTF8(path).c_str(), arraysize(full_path));
- return UTF8ToWide(dirname(full_path));
- }
-}
-
bool AbsolutePath(FilePath* path) {
char full_path[PATH_MAX];
if (realpath(path->value().c_str(), full_path) == NULL)
« no previous file with comments | « base/file_util_deprecated.h ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698