summaryrefslogtreecommitdiffstats
path: root/base/base_paths.cc
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:54:04 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-30 23:54:04 +0000
commit640517fdd23e08ed95cf129d27457db817ee6124 (patch)
tree2674bc857b9d1b566e05bcfa1dd5c8cfd1897dbf /base/base_paths.cc
parentf92ed219c9aeeed79993d1d32f34e5d5c9888dbe (diff)
downloadchromium_src-640517fdd23e08ed95cf129d27457db817ee6124.zip
chromium_src-640517fdd23e08ed95cf129d27457db817ee6124.tar.gz
chromium_src-640517fdd23e08ed95cf129d27457db817ee6124.tar.bz2
Begin the first small step towards using FilePath everywhere:
- Add some transition APIs. - Start migrating some code to transition APIs. Review URL: http://codereview.chromium.org/8825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_paths.cc')
-rw-r--r--base/base_paths.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/base/base_paths.cc b/base/base_paths.cc
index f3b3f98..672bde1 100644
--- a/base/base_paths.cc
+++ b/base/base_paths.cc
@@ -4,6 +4,7 @@
#include "base/base_paths.h"
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -12,15 +13,15 @@ namespace base {
bool PathProvider(int key, std::wstring* result) {
// NOTE: DIR_CURRENT is a special cased in PathService::Get
- std::wstring cur;
+ FilePath cur;
switch (key) {
case base::DIR_EXE:
PathService::Get(base::FILE_EXE, &cur);
- file_util::TrimFilename(&cur);
+ cur = cur.DirName();
break;
case base::DIR_MODULE:
PathService::Get(base::FILE_MODULE, &cur);
- file_util::TrimFilename(&cur);
+ cur = cur.DirName();
break;
case base::DIR_TEMP:
if (!file_util::GetTempDir(&cur))
@@ -30,7 +31,7 @@ bool PathProvider(int key, std::wstring* result) {
return false;
}
- result->swap(cur);
+ *result = cur.ToWStringHack();
return true;
}