diff options
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 15 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.h | 2 | ||||
-rw-r--r-- | chrome_frame/test/perf/chrome_frame_perftest.cc | 9 |
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_); } |