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

Unified Diff: chrome/browser/ui/webui/version_handler.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: chrome/browser/ui/webui/version_handler.cc
diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc
index 6dc3bdb11f2d01e08b2d48f69832f1f2bce4a01c..19ae055126c8fa2fc5feaca95fdd291d687afcf2 100644
--- a/chrome/browser/ui/webui/version_handler.cc
+++ b/chrome/browser/ui/webui/version_handler.cc
@@ -27,17 +27,17 @@ void GetFilePaths(const base::FilePath& profile_path,
string16* profile_path_out) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- base::FilePath executable_path =
- CommandLine::ForCurrentProcess()->GetProgram();
- if (file_util::AbsolutePath(&executable_path)) {
+ base::FilePath executable_path = base::MakeAbsoluteFilePath(
+ CommandLine::ForCurrentProcess()->GetProgram());
+ if (!executable_path.empty()) {
*exec_path_out = executable_path.LossyDisplayName();
} else {
*exec_path_out =
l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_PATH_NOTFOUND);
}
- base::FilePath profile_path_copy(profile_path);
- if (!profile_path.empty() && file_util::AbsolutePath(&profile_path_copy)) {
+ base::FilePath profile_path_copy(base::MakeAbsoluteFilePath(profile_path));
+ if (!profile_path.empty() && !profile_path_copy.empty()) {
*profile_path_out = profile_path.LossyDisplayName();
} else {
*profile_path_out =

Powered by Google App Engine
This is Rietveld 408576698