diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 17:58:46 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 17:58:46 +0000 |
commit | f63ae31ec0812e1f032631fd6b3f8b87946fcd34 (patch) | |
tree | 304e8c4cbc01fc9a5540ff132aac3a238d6e67e6 /chrome/test/testing_profile.h | |
parent | 8c992fc4b043391a8db1f0ef0926186d5081d487 (diff) | |
download | chromium_src-f63ae31ec0812e1f032631fd6b3f8b87946fcd34.zip chromium_src-f63ae31ec0812e1f032631fd6b3f8b87946fcd34.tar.gz chromium_src-f63ae31ec0812e1f032631fd6b3f8b87946fcd34.tar.bz2 |
Bring many of the template_url classes into the fold for the Mac. Note that template_url_model_unittest isn't there; it requires a working database first.
Review URL: http://codereview.chromium.org/19714
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/testing_profile.h')
-rw-r--r-- | chrome/test/testing_profile.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 83f9167..bcaa346 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -6,16 +6,27 @@ #define CHROME_TEST_TESTING_PROFILE_H_ #include "base/base_paths.h" +#include "base/file_path.h" #include "base/path_service.h" #include "base/file_util.h" -#include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/browser_prefs.h" -#include "chrome/browser/history/history.h" #include "chrome/browser/profile.h" #include "chrome/browser/search_engines/template_url_model.h" -#include "chrome/browser/sessions/session_service.h" #include "chrome/common/pref_service.h" +#if defined(OS_POSIX) +// TODO(port): get rid of this include. It's used just to provide declarations +// and stub definitions for classes we encouter during the porting effort. +#include "chrome/common/temp_scaffolding_stubs.h" +#endif + +// TODO(port): Get rid of this section and finish porting. +#if defined(OS_WIN) +#include "chrome/browser/bookmarks/bookmark_model.h" +#include "chrome/browser/history/history.h" +#include "chrome/browser/sessions/session_service.h" +#endif + class TestingProfile : public Profile { public: TestingProfile(); @@ -83,11 +94,12 @@ class TestingProfile : public Profile { return NULL; } virtual PrefService* GetPrefs() { - std::wstring prefs_filename; + FilePath prefs_filename; PathService::Get(base::DIR_TEMP, &prefs_filename); - file_util::AppendToPath(&prefs_filename, L"TestPreferences"); + prefs_filename = + prefs_filename.Append(FILE_PATH_LITERAL("TestPreferences")); if (!prefs_.get()) { - prefs_.reset(new PrefService(prefs_filename)); + prefs_.reset(new PrefService(prefs_filename.ToWStringHack())); Profile::RegisterUserPrefs(prefs_.get()); browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); } @@ -146,7 +158,7 @@ class TestingProfile : public Profile { virtual BookmarkModel* GetBookmarkModel() { return bookmark_bar_model_.get(); } - virtual bool Profile::IsSameProfile(Profile *p) { + virtual bool IsSameProfile(Profile *p) { return this == p; } virtual base::Time GetStartTime() const { |