summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 00:25:34 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 00:25:34 +0000
commitfd1e44cd31fc8c90d39479a5fe4bae6019a989b3 (patch)
treec615848c4a19eabd5b30918b4c233796136ef986 /chrome_frame/test
parent7a28f1690831eeb3c33d259a7bad9e676ce41ed7 (diff)
downloadchromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.zip
chromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.tar.gz
chromium_src-fd1e44cd31fc8c90d39479a5fe4bae6019a989b3.tar.bz2
Remove the Chrome Frame preprocessor define in chrome_constants.cc and deal with resulting fallout.
Also, remove several instances of Chrome Frame using wstrings instead of FilePaths. The main goal of this patch is to move towards ensuring that Chrome Frame and Google Chrome share binary-identical exes and dlls except for setup.exe and mini_installer.exe. Review URL: http://codereview.chromium.org/338025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc15
-rw-r--r--chrome_frame/test/net/fake_external_tab.h2
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc9
3 files changed, 13 insertions, 13 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index ab3437b..78430fe 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -21,11 +21,12 @@
#include "chrome/browser/browser_prefs.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome_frame/utils.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
@@ -68,7 +69,7 @@ bool PromptAfterSetup() {
FakeExternalTab::FakeExternalTab() {
PathService::Get(chrome::DIR_USER_DATA, &overridden_user_dir_);
- user_data_dir_ = FilePath::FromWStringHack(GetProfilePath());
+ GetProfilePath(&user_data_dir_);
PathService::Override(chrome::DIR_USER_DATA, user_data_dir_);
process_singleton_.reset(new ProcessSingleton(user_data_dir_));
}
@@ -83,11 +84,11 @@ std::wstring FakeExternalTab::GetProfileName() {
return L"iexplore";
}
-std::wstring FakeExternalTab::GetProfilePath() {
- std::wstring path;
- GetUserProfileBaseDirectory(&path);
- file_util::AppendToPath(&path, GetProfileName());
- return path;
+bool FakeExternalTab::GetProfilePath(FilePath* path) {
+ if (!chrome::GetChromeFrameUserDataDirectory(path))
+ return false;
+ *path = path->Append(GetProfileName());
+ return true;
}
void FakeExternalTab::Initialize() {
diff --git a/chrome_frame/test/net/fake_external_tab.h b/chrome_frame/test/net/fake_external_tab.h
index 79e45cf..bd67a7f 100644
--- a/chrome_frame/test/net/fake_external_tab.h
+++ b/chrome_frame/test/net/fake_external_tab.h
@@ -28,7 +28,7 @@ class FakeExternalTab {
virtual std::wstring GetProfileName();
- virtual std::wstring GetProfilePath();
+ virtual bool GetProfilePath(FilePath* path);
virtual void Initialize();
virtual void Shutdown();
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index c896fa4..215f076 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -20,6 +20,7 @@
#include "base/time.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_paths_internal.h"
#include "chrome/test/chrome_process_util.h"
#include "chrome/test/perf/mem_usage.h"
#include "chrome/test/ui/ui_test.h"
@@ -638,13 +639,11 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase {
void InitiateNextNavigation() {
if (browser_pid_ == 0) {
- std::wstring profile_directory;
- if (GetUserProfileBaseDirectory(&profile_directory)) {
- file_util::AppendToPath(&profile_directory,
- GetHostProcessName(false));
+ FilePath profile_directory;
+ if (chrome::GetChromeFrameUserDataDirectory(&user_data_dir_)) {
+ user_data_dir_ = user_data_dir_.Append(GetHostProcessName(false));
}
- user_data_dir_ = FilePath::FromWStringHack(profile_directory);
browser_pid_ = ChromeBrowserProcessId(user_data_dir_);
}