diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 01:04:11 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 01:04:11 +0000 |
commit | 4c0040c49331c5cb5b88960ecec04ce8a5f0756a (patch) | |
tree | eb20f932e07a7c3fcb5bf144cba675d48ca791af /base/path_service.cc | |
parent | 1b3deed79fc638d3755ba5159108712238d8beb7 (diff) | |
download | chromium_src-4c0040c49331c5cb5b88960ecec04ce8a5f0756a.zip chromium_src-4c0040c49331c5cb5b88960ecec04ce8a5f0756a.tar.gz chromium_src-4c0040c49331c5cb5b88960ecec04ce8a5f0756a.tar.bz2 |
To pass string_util_unittest, we need the ICU data file. To get the ICU data file, we need some of PathService, which brings along with it a bunch of other needed functions. So here are a bunch of stubs, along with another file's worth of passing tests. (Based on a patch from Dean.)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.cc')
-rw-r--r-- | base/path_service.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/base/path_service.cc b/base/path_service.cc index e8d92a5..f66069a 100644 --- a/base/path_service.cc +++ b/base/path_service.cc @@ -46,8 +46,10 @@ namespace base { bool PathProvider(int key, std::wstring* result); #if defined(OS_WIN) bool PathProviderWin(int key, std::wstring* result); -#elif defined (OS_MACOSX) +#elif defined(OS_MACOSX) bool PathProviderMac(int key, std::wstring* result); +#elif defined(OS_LINUX) + bool PathProviderLinux(int key, std::wstring* result); #endif } @@ -97,8 +99,19 @@ static Provider base_provider_win = { #endif }; #endif - - + +#if defined(OS_LINUX) +static Provider base_provider_linux = { + base::PathProviderLinux, + &base_provider, +#ifndef NDEBUG + base::PATH_LINUX_START, + base::PATH_LINUX_END +#endif + }; +#endif + + struct PathData { Lock lock; PathMap cache; // Track mappings from path key to path value. @@ -111,7 +124,7 @@ struct PathData { #elif defined(OS_MACOSX) providers = &base_provider_mac; #elif defined(OS_LINUX) - providers = &base_provider; + providers = &base_provider_linux; #endif } }; |