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

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: 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..31492c2cb2435c32a2a6f5dce05424ef1f092b9d 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 = basePath.AsAbsolute();
+ 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;
@@ -575,8 +576,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);
+ base::FilePath path(UTF8ToWide(utf8_path)).AsAbsolute();
brettw 2013/03/30 04:19:38 Fixme
return WebString(path.value());
#else
base::FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path)));
@@ -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 = path.AsAbsolute();
}
#else
- file_util::AbsolutePath(&path);
+ path = path.AsAbsolute();
#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(path.AsAbsolute());
}
WebURL RewriteLayoutTestsURL(const std::string& utf8_url) {

Powered by Google App Engine
This is Rietveld 408576698