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

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: git try Created 7 years, 8 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 8b6ef9fffbd6fc179cddd0c51772e24c91b6612c..70372981d4ed2704090510c1d553bc81beaae3c8 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -255,7 +255,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;
@@ -573,8 +574,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)
@@ -589,10 +589,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)
@@ -612,8 +612,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