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

Unified Diff: trunk/src/base/nix/xdg_util.cc

Issue 284333002: Revert 270872 "Move all callers of GetHomeDir() to PathService::..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/base/file_util_posix.cc ('k') | trunk/src/chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/nix/xdg_util.cc
===================================================================
--- trunk/src/base/nix/xdg_util.cc (revision 270950)
+++ trunk/src/base/nix/xdg_util.cc (working copy)
@@ -6,11 +6,9 @@
#include <string>
-#include "base/base_paths.h"
#include "base/environment.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
-#include "base/path_service.h"
#include "base/third_party/xdg_user_dirs/xdg_user_dir_lookup.h"
namespace {
@@ -30,12 +28,10 @@
const char* fallback_dir) {
FilePath path;
std::string env_value;
- if (env->GetVar(env_name, &env_value) && !env_value.empty()) {
+ if (env->GetVar(env_name, &env_value) && !env_value.empty())
path = FilePath(env_value);
- } else {
- PathService::Get(base::DIR_HOME, &path);
- path = path.Append(fallback_dir);
- }
+ else
+ path = GetHomeDir().Append(fallback_dir);
return path.StripTrailingSeparators();
}
@@ -46,8 +42,7 @@
path = FilePath(xdg_dir);
free(xdg_dir);
} else {
- PathService::Get(base::DIR_HOME, &path);
- path = path.Append(fallback_dir);
+ path = GetHomeDir().Append(fallback_dir);
}
return path.StripTrailingSeparators();
}
« no previous file with comments | « trunk/src/base/file_util_posix.cc ('k') | trunk/src/chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698