diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 23:50:20 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 23:50:20 +0000 |
commit | 343244d3b5fbea4d94bbae84dfad6d8b93bb56e3 (patch) | |
tree | fe51d29238e7c75aa35dd775b4de881796ae0c52 /chrome/test/base | |
parent | 156f0c678513cc85d6a194a235126fa283ece115 (diff) | |
download | chromium_src-343244d3b5fbea4d94bbae84dfad6d8b93bb56e3.zip chromium_src-343244d3b5fbea4d94bbae84dfad6d8b93bb56e3.tar.gz chromium_src-343244d3b5fbea4d94bbae84dfad6d8b93bb56e3.tar.bz2 |
Fixing the way HistoryServiceFactory access the history service and updated affected files. Previously, it was forcing creation of the HistoryService unnecessarily which caused a decrease in mac performance.
BUG=133762,97804
TEST=unittests
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10536230
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base')
-rw-r--r-- | chrome/test/base/testing_profile.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index a652086..db90ae6 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc @@ -282,7 +282,7 @@ void TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { void TestingProfile::DestroyHistoryService() { scoped_refptr<HistoryService> history_service = - HistoryServiceFactory::GetForProfileIfExists(this); + HistoryServiceFactory::GetForProfileWithoutCreating(this); if (!history_service.get()) return; @@ -347,7 +347,7 @@ void TestingProfile::CreateBookmarkModel(bool delete_file) { this, BuildBookmarkModel)); HistoryService* history_service = - HistoryServiceFactory::GetForProfileIfExists(this).get(); + HistoryServiceFactory::GetForProfileWithoutCreating(this).get(); if (history_service) { history_service->history_backend_->bookmark_service_ = bookmark_service; @@ -475,11 +475,11 @@ FaviconService* TestingProfile::GetFaviconService(ServiceAccessType access) { } HistoryService* TestingProfile::GetHistoryService(ServiceAccessType access) { - return HistoryServiceFactory::GetForProfileIfExists(this); + return HistoryServiceFactory::GetForProfileIfExists(this, access); } HistoryService* TestingProfile::GetHistoryServiceWithoutCreating() { - return HistoryServiceFactory::GetForProfileIfExists(this); + return HistoryServiceFactory::GetForProfileWithoutCreating(this); } net::CookieMonster* TestingProfile::GetCookieMonster() { @@ -682,7 +682,7 @@ PrefProxyConfigTracker* TestingProfile::GetProxyConfigTracker() { void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { scoped_refptr<HistoryService> history_service = - HistoryServiceFactory::GetForProfileIfExists(this); + HistoryServiceFactory::GetForProfile(this, Profile::EXPLICIT_ACCESS); DCHECK(history_service.get()); DCHECK(MessageLoop::current()); |