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

Unified Diff: base/base_paths.cc

Issue 8825: Begin the first small step towards using FilePath everywhere: (Closed)
Patch Set: works on windows Created 12 years, 2 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 | « no previous file | base/base_paths_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths.cc
diff --git a/base/base_paths.cc b/base/base_paths.cc
index f3b3f988458848f4062864ee995ca61cb38126e8..672bde150b83f1d4f0ded7602c5e711480e4ef46 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;
}
« no previous file with comments | « no previous file | base/base_paths_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698