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


CrOS-Libchrome-Original-Commit: 640517fdd23e08ed95cf129d27457db817ee6124
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 @@
 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 @@
       return false;
   }
 
-  result->swap(cur);
+  *result = cur.ToWStringHack();
   return true;
 }