summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/importer/profile_writer.cc3
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc8
2 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index eb3b659..18a5201 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -13,6 +13,7 @@
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -102,7 +103,7 @@ void ProfileWriter::AddIE7PasswordInfo(const IE7PasswordInfo& info) {
void ProfileWriter::AddHistoryPage(const history::URLRows& page,
history::VisitSource visit_source) {
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->
+ HistoryServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS)->
AddPagesWithDetails(page, visit_source);
}
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 8294c6d..cb4b604 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -15,6 +15,8 @@
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_event_router_forwarder.h"
+#include "chrome/browser/history/history.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/profiles/profile.h"
@@ -216,13 +218,15 @@ TEST_F(ProfileManagerTest, CreateAndUseTwoProfiles) {
// Force lazy-init of some profile services to simulate use.
profile1->CreateHistoryService(true, false);
- EXPECT_TRUE(profile1->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ EXPECT_TRUE(HistoryServiceFactory::GetForProfile(profile1,
+ Profile::EXPLICIT_ACCESS));
profile1->CreateBookmarkModel(true);
EXPECT_TRUE(profile1->GetBookmarkModel());
profile2->CreateBookmarkModel(true);
EXPECT_TRUE(profile2->GetBookmarkModel());
profile2->CreateHistoryService(true, false);
- EXPECT_TRUE(profile2->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ EXPECT_TRUE(HistoryServiceFactory::GetForProfile(profile2,
+ Profile::EXPLICIT_ACCESS));
// Make sure any pending tasks run before we destroy the profiles.
message_loop_.RunAllPending();