summaryrefslogtreecommitdiffstats
path: root/base/path_service.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-21 01:29:00 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-21 01:29:00 +0000
commit5d1937bb5d9137cbaa1c947c383c3742179062a9 (patch)
treee8644c6e2b7ce1c509d47b00b40bc5d41ef2f63f /base/path_service.cc
parent29d334a2a5e8b66a83c161f54f83f3cdf5a31240 (diff)
downloadchromium_src-5d1937bb5d9137cbaa1c947c383c3742179062a9.zip
chromium_src-5d1937bb5d9137cbaa1c947c383c3742179062a9.tar.gz
chromium_src-5d1937bb5d9137cbaa1c947c383c3742179062a9.tar.bz2
posix: refactor duplicated path-handling code
We had the same code in three headers, and an "if FREEBSD" in a _linux.cc file. Review URL: http://codereview.chromium.org/414063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.cc')
-rw-r--r--base/path_service.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/base/path_service.cc b/base/path_service.cc
index 0e4c6a2..e363fe6 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -24,8 +24,8 @@ namespace base {
bool PathProviderWin(int key, FilePath* result);
#elif defined(OS_MACOSX)
bool PathProviderMac(int key, FilePath* result);
-#elif defined(OS_LINUX)
- bool PathProviderLinux(int key, FilePath* result);
+#elif defined(OS_POSIX)
+ bool PathProviderPosix(int key, FilePath* result);
#endif
}
@@ -56,7 +56,7 @@ static Provider base_provider = {
true
};
-#ifdef OS_WIN
+#if defined(OS_WIN)
static Provider base_provider_win = {
base::PathProviderWin,
&base_provider,
@@ -68,7 +68,7 @@ static Provider base_provider_win = {
};
#endif
-#ifdef OS_MACOSX
+#if defined(OS_MACOSX)
static Provider base_provider_mac = {
base::PathProviderMac,
&base_provider,
@@ -80,13 +80,13 @@ static Provider base_provider_mac = {
};
#endif
-#if defined(OS_LINUX)
-static Provider base_provider_linux = {
- base::PathProviderLinux,
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+static Provider base_provider_posix = {
+ base::PathProviderPosix,
&base_provider,
#ifndef NDEBUG
- base::PATH_LINUX_START,
- base::PATH_LINUX_END,
+ 0,
+ 0,
#endif
true
};
@@ -104,8 +104,8 @@ struct PathData {
providers = &base_provider_win;
#elif defined(OS_MACOSX)
providers = &base_provider_mac;
-#elif defined(OS_LINUX)
- providers = &base_provider_linux;
+#elif defined(OS_POSIX)
+ providers = &base_provider_posix;
#endif
}