summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 03:41:02 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 03:41:02 +0000
commit6ec54c1e86aa5d29c7223a86acbfa850be39c806 (patch)
tree8c0be0238c2f35646c3545060375a9032c50b04d /chrome_frame
parent89f580b14355e7342cff030747d12ec18f8ca012 (diff)
downloadchromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.zip
chromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.tar.gz
chromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.tar.bz2
Revert wstring patch (r29078 and follow up commits). It is causing failures on the buildbots.
TBR=nsylvain Review URL: http://codereview.chromium.org/280004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_launcher.cc9
-rw-r--r--chrome_frame/chrome_launcher.h6
-rw-r--r--chrome_frame/chrome_tab.cc8
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc6
-rw-r--r--chrome_frame/test_utils.cc13
5 files changed, 19 insertions, 23 deletions
diff --git a/chrome_frame/chrome_launcher.cc b/chrome_frame/chrome_launcher.cc
index b9af23d..f742a28 100644
--- a/chrome_frame/chrome_launcher.cc
+++ b/chrome_frame/chrome_launcher.cc
@@ -90,10 +90,10 @@ bool SanitizeAndLaunchChrome(const wchar_t* command_line) {
return base::LaunchApp(sanitized.command_line_string(), false, false, NULL);
}
-FilePath GetChromeExecutablePath() {
- FilePath cur_path;
+std::wstring GetChromeExecutablePath() {
+ std::wstring cur_path;
PathService::Get(base::DIR_MODULE, &cur_path);
- cur_path = cur_path.Append(chrome::kBrowserProcessExecutableName);
+ file_util::AppendToPath(&cur_path, chrome::kBrowserProcessExecutableName);
// The installation model for Chrome places the DLLs in a versioned
// sub-folder one down from the Chrome executable. If we fail to find
@@ -101,7 +101,8 @@ FilePath GetChromeExecutablePath() {
// instead.
if (!file_util::PathExists(cur_path)) {
PathService::Get(base::DIR_MODULE, &cur_path);
- cur_path = cur_path.DirName().Append(chrome::kBrowserProcessExecutableName);
+ file_util::UpOneDirectory(&cur_path);
+ file_util::AppendToPath(&cur_path, chrome::kBrowserProcessExecutableName);
}
return cur_path;
diff --git a/chrome_frame/chrome_launcher.h b/chrome_frame/chrome_launcher.h
index 86dc03f..7c2aea9 100644
--- a/chrome_frame/chrome_launcher.h
+++ b/chrome_frame/chrome_launcher.h
@@ -7,8 +7,6 @@
#include <string>
-#include "base/file_path.h"
-
class CommandLine;
namespace chrome_launcher {
@@ -32,12 +30,12 @@ CommandLine* CreateLaunchCommandLine();
void SanitizeCommandLine(const CommandLine& original, CommandLine* sanitized);
// Given a command-line without an initial program part, launch our associated
-// chrome.exe with a sanitized version of that command line. Returns true iff
+// chrome.exe with a sanitized version of that command line. Returns true iff
// successful.
bool SanitizeAndLaunchChrome(const wchar_t* command_line);
// Returns the full path to the Chrome executable.
-FilePath GetChromeExecutablePath();
+std::wstring GetChromeExecutablePath();
// The type of the CfLaunchChrome entrypoint exported from this DLL.
typedef int (__stdcall *CfLaunchChromeProc)();
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 601ef06..923d957d8 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -61,10 +61,10 @@ class ChromeTabModule
}
if (SUCCEEDED(hr)) {
- FilePath app_path =
- chrome_launcher::GetChromeExecutablePath().DirName();
- hr = registrar->AddReplacement(L"CHROME_APPPATH",
- app_path.value().c_str());
+ std::wstring app_path(
+ chrome_launcher::GetChromeExecutablePath());
+ app_path = file_util::GetDirectoryFromPath(app_path);
+ hr = registrar->AddReplacement(L"CHROME_APPPATH", app_path.c_str());
DCHECK(SUCCEEDED(hr));
}
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index c896fa4..79bbd7b 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -621,8 +621,7 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase {
file_util::AppendToPath(&chrome_exe_test_path,
chrome::kBrowserProcessExecutableName);
- if (!file_util::PathExists(
- FilePath::FromWStringHack(chrome_exe_test_path))) {
+ if (!file_util::PathExists(chrome_exe_test_path)) {
file_util::UpOneDirectory(&chrome_exe_path);
chrome_exe_test_path = chrome_exe_path;
@@ -630,8 +629,7 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase {
chrome::kBrowserProcessExecutableName);
}
- EXPECT_TRUE(
- file_util::PathExists(FilePath::FromWStringHack(chrome_exe_test_path)));
+ EXPECT_TRUE(file_util::PathExists(chrome_exe_test_path));
return chrome_exe_path;
}
diff --git a/chrome_frame/test_utils.cc b/chrome_frame/test_utils.cc
index abfdbee..2d47c71 100644
--- a/chrome_frame/test_utils.cc
+++ b/chrome_frame/test_utils.cc
@@ -15,18 +15,17 @@
// Statics
-FilePath ScopedChromeFrameRegistrar::GetChromeFrameBuildPath() {
- FilePath build_path;
+std::wstring ScopedChromeFrameRegistrar::GetChromeFrameBuildPath() {
+ std::wstring build_path;
PathService::Get(chrome::DIR_APP, &build_path);
- build_path = build_path.Append(L"servers").
- Append(L"npchrome_tab.dll");
+ file_util::AppendToPath(&build_path, L"servers\\npchrome_tab.dll");
file_util::PathExists(build_path);
return build_path;
}
void ScopedChromeFrameRegistrar::RegisterDefaults() {
- FilePath dll_path = GetChromeFrameBuildPath();
- RegisterAtPath(dll_path.value());
+ std::wstring dll_path_ = GetChromeFrameBuildPath();
+ RegisterAtPath(dll_path_);
}
void ScopedChromeFrameRegistrar::RegisterAtPath(
@@ -57,7 +56,7 @@ void ScopedChromeFrameRegistrar::RegisterAtPath(
// Non-statics
ScopedChromeFrameRegistrar::ScopedChromeFrameRegistrar() {
- original_dll_path_ = GetChromeFrameBuildPath().ToWStringHack();
+ original_dll_path_ = GetChromeFrameBuildPath();
RegisterChromeFrameAtPath(original_dll_path_);
}