summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test_utils.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 10:43:00 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 10:43:00 +0000
commitbcd840cdc6c8f30782048cebafee9cc5f4a96883 (patch)
tree77b1b5d109ec6938b76b8c029e1a27f04426a4f9 /chrome_frame/test_utils.cc
parent98efd9a924ec054f953c0798b9208c887c47646d (diff)
downloadchromium_src-bcd840cdc6c8f30782048cebafee9cc5f4a96883.zip
chromium_src-bcd840cdc6c8f30782048cebafee9cc5f4a96883.tar.gz
chromium_src-bcd840cdc6c8f30782048cebafee9cc5f4a96883.tar.bz2
chrome_frame: Remove several instances of the deprecated wstrings functions
and use their FilePath equivalents. BUG=24874 TEST=included Review URL: http://codereview.chromium.org/2125021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test_utils.cc')
-rw-r--r--chrome_frame/test_utils.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/chrome_frame/test_utils.cc b/chrome_frame/test_utils.cc
index 7f8161a..6e9f6bf 100644
--- a/chrome_frame/test_utils.cc
+++ b/chrome_frame/test_utils.cc
@@ -21,7 +21,7 @@
const wchar_t kChromeFrameDllName[] = L"npchrome_frame.dll";
const wchar_t kChromeLauncherExeName[] = L"chrome_launcher.exe";
-const wchar_t kReferenceChromeFrameDllName[] = L"npchrome_tab.dll";
+const char kReferenceChromeFrameDllName[] = "npchrome_tab.dll";
// Statics
FilePath ScopedChromeFrameRegistrar::GetChromeFrameBuildPath() {
@@ -99,20 +99,21 @@ void ScopedChromeFrameRegistrar::UnregisterAtPath(
ASSERT_TRUE(FreeLibrary(dll_handle));
}
-std::wstring ScopedChromeFrameRegistrar::GetReferenceChromeFrameDllPath() {
- std::wstring reference_build_dir;
+FilePath ScopedChromeFrameRegistrar::GetReferenceChromeFrameDllPath() {
+ FilePath reference_build_dir;
PathService::Get(chrome::DIR_APP, &reference_build_dir);
- file_util::UpOneDirectory(&reference_build_dir);
- file_util::UpOneDirectory(&reference_build_dir);
-
- file_util::AppendToPath(&reference_build_dir, L"chrome_frame");
- file_util::AppendToPath(&reference_build_dir, L"tools");
- file_util::AppendToPath(&reference_build_dir, L"test");
- file_util::AppendToPath(&reference_build_dir, L"reference_build");
- file_util::AppendToPath(&reference_build_dir, L"chrome");
- file_util::AppendToPath(&reference_build_dir, L"servers");
- file_util::AppendToPath(&reference_build_dir, kReferenceChromeFrameDllName);
+ reference_build_dir = reference_build_dir.DirName();
+ reference_build_dir = reference_build_dir.DirName();
+
+ reference_build_dir = reference_build_dir.AppendASCII("chrome_frame");
+ reference_build_dir = reference_build_dir.AppendASCII("tools");
+ reference_build_dir = reference_build_dir.AppendASCII("test");
+ reference_build_dir = reference_build_dir.AppendASCII("reference_build");
+ reference_build_dir = reference_build_dir.AppendASCII("chrome");
+ reference_build_dir = reference_build_dir.AppendASCII("servers");
+ reference_build_dir = reference_build_dir.AppendASCII(
+ kReferenceChromeFrameDllName);
return reference_build_dir;
}
@@ -125,7 +126,7 @@ ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar(
}
ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar() {
- original_dll_path_ = GetChromeFrameBuildPath().ToWStringHack();
+ original_dll_path_ = GetChromeFrameBuildPath().value();
RegisterChromeFrameAtPath(original_dll_path_);
}
@@ -142,7 +143,7 @@ void ScopedChromeFrameRegistrar::RegisterChromeFrameAtPath(
}
void ScopedChromeFrameRegistrar::RegisterReferenceChromeFrameBuild() {
- RegisterChromeFrameAtPath(GetReferenceChromeFrameDllPath());
+ RegisterChromeFrameAtPath(GetReferenceChromeFrameDllPath().value());
}
std::wstring ScopedChromeFrameRegistrar::GetChromeFrameDllPath() const {