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

Unified Diff: webkit/support/webkit_support.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move AsAbsolute back out of FilePath Created 7 years, 9 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
Index: webkit/support/webkit_support.cc
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index ef3d199bb5d8bdfb7c397e29330f924fa901110c..b5afc8e919c002a6f73661d8bc65b4876d170e4c 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -258,7 +258,8 @@ base::FilePath GetWebKitRootDirFilePath() {
// We're in a WebKit-only/xcodebuild checkout on Mac
basePath = basePath.Append(FILE_PATH_LITERAL("../../.."));
}
- CHECK(file_util::AbsolutePath(&basePath));
+ basePath = base::MakeAbsoluteFilePath(basePath);
+ CHECK(!basePath.empty());
// We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the
// WebKit root. That, or we have no idea where we are.
return basePath;
@@ -576,8 +577,7 @@ void PostDelayedTask(TaskAdaptor* task, int64 delay_ms) {
WebString GetAbsoluteWebStringFromUTF8Path(const std::string& utf8_path) {
#if defined(OS_WIN)
base::FilePath path(UTF8ToWide(utf8_path));
- file_util::AbsolutePath(&path);
- return WebString(path.value());
+ return WebString(base::MakeAbsoluteFilePath(path).value());
#else
base::FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path)));
#if defined(OS_ANDROID)
@@ -592,10 +592,10 @@ WebString GetAbsoluteWebStringFromUTF8Path(const std::string& utf8_path) {
net::FileURLToFilePath(base_url.Resolve(path.value()), &path);
}
} else {
- file_util::AbsolutePath(&path);
+ path = base::MakeAbsoluteFilePath(path);
}
#else
- file_util::AbsolutePath(&path);
+ path = base::MakeAbsoluteFilePath(path);
#endif // else defined(OS_ANDROID)
return WideToUTF16(base::SysNativeMBToWide(path.value()));
#endif // else defined(OS_WIN)
@@ -615,8 +615,7 @@ WebURL CreateURLForPathOrURL(const std::string& path_or_url_in_nativemb) {
#else
base::FilePath path(path_or_url_in_nativemb);
#endif
- file_util::AbsolutePath(&path);
- return net::FilePathToFileURL(path);
+ return net::FilePathToFileURL(base::MakeAbsoluteFilePath(path));
}
WebURL RewriteLayoutTestsURL(const std::string& utf8_url) {

Powered by Google App Engine
This is Rietveld 408576698