summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/base_paths_win.cc6
-rw-r--r--base/i18n/icu_util.cc7
-rw-r--r--base/path_service.cc2
-rw-r--r--base/path_service.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
index 89c2ff3..bc8566c 100644
--- a/base/base_paths_win.cc
+++ b/base/base_paths_win.cc
@@ -102,10 +102,8 @@ bool PathProviderWin(int key, FilePath* result) {
case base::DIR_SOURCE_ROOT:
// On Windows, unit tests execute two levels deep from the source root.
// For example: chrome/{Debug|Release}/ui_tests.exe
- PathService::Get(base::DIR_EXE, &wstring_path);
- file_util::UpOneDirectory(&wstring_path);
- file_util::UpOneDirectory(&wstring_path);
- cur = FilePath(wstring_path);
+ PathService::Get(base::DIR_EXE, &cur);
+ cur = cur.DirName().DirName();
break;
default:
return false;
diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc
index 6239a01..bccc1ab 100644
--- a/base/i18n/icu_util.cc
+++ b/base/i18n/icu_util.cc
@@ -56,12 +56,11 @@ bool Initialize() {
#if (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED)
// We expect to find the ICU data module alongside the current module.
- std::wstring data_path;
+ FilePath data_path;
PathService::Get(base::DIR_MODULE, &data_path);
- file_util::AppendToPath(&data_path,
- ASCIIToWide(ICU_UTIL_DATA_SHARED_MODULE_NAME));
+ data_path = data_path.AppendASCII(ICU_UTIL_DATA_SHARED_MODULE_NAME);
- HMODULE module = LoadLibrary(data_path.c_str());
+ HMODULE module = LoadLibrary(data_path.value().c_str());
if (!module) {
LOG(ERROR) << "Failed to load " << ICU_UTIL_DATA_SHARED_MODULE_NAME;
return false;
diff --git a/base/path_service.cc b/base/path_service.cc
index da172b3..4a4c100 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -188,6 +188,7 @@ bool PathService::Get(int key, FilePath* result) {
return true;
}
+#if defined(OS_WIN)
// static
bool PathService::Get(int key, std::wstring* result) {
// Deprecated compatibility function.
@@ -197,6 +198,7 @@ bool PathService::Get(int key, std::wstring* result) {
*result = path.ToWStringHack();
return true;
}
+#endif
bool PathService::IsOverridden(int key) {
PathData* path_data = GetPathData();
diff --git a/base/path_service.h b/base/path_service.h
index 39aaa2a..b0e51e4 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -26,9 +26,11 @@ class PathService {
// Returns true if the directory or file was successfully retrieved. On
// failure, 'path' will not be changed.
static bool Get(int key, FilePath* path);
+#if defined(OS_WIN)
// This version, producing a wstring, is deprecated and only kept around
// until we can fix all callers.
static bool Get(int key, std::wstring* path);
+#endif
// Overrides the path to a special directory or file. This cannot be used to
// change the value of DIR_CURRENT, but that should be obvious. Also, if the