summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor.cc3
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor_unittest.cc7
-rw-r--r--chrome/browser/prerender/prerender_local_predictor.cc3
3 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc
index 3311906..77b3efe 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_notifications.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_database.h"
#include "chrome/browser/predictors/autocomplete_action_predictor_factory.h"
#include "chrome/browser/predictors/predictor_database.h"
@@ -432,7 +433,7 @@ void AutocompleteActionPredictor::CreateCaches(
// If the history service is ready, delete any old or invalid entries.
HistoryService* history_service =
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryServiceFactory::GetForProfile(profile_, Profile::EXPLICIT_ACCESS);
if (!TryDeleteOldEntries(history_service)) {
// Wait for the notification that the history service is ready and the URL
// DB is loaded.
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
index 7c76bc3..11f82c4 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
@@ -14,6 +14,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/history/history.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_database.h"
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
@@ -119,7 +120,8 @@ class AutocompleteActionPredictorTest : public testing::Test {
history::URLID AddRowToHistory(const TestUrlInfo& test_row) {
HistoryService* history =
- profile_.GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryServiceFactory::GetForProfile(&profile_,
+ Profile::EXPLICIT_ACCESS);
CHECK(history);
history::URLDatabase* url_db = history->InMemoryDatabase();
CHECK(url_db);
@@ -182,7 +184,8 @@ class AutocompleteActionPredictorTest : public testing::Test {
void DeleteOldIdsFromCaches(
std::vector<AutocompleteActionPredictorTable::Row::Id>* id_list) {
HistoryService* history_service =
- profile_.GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryServiceFactory::GetForProfile(&profile_,
+ Profile::EXPLICIT_ACCESS);
ASSERT_TRUE(history_service);
history::URLDatabase* url_db = history_service->InMemoryDatabase();
diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc
index 5fee136..f8925b7 100644
--- a/chrome/browser/prerender/prerender_local_predictor.cc
+++ b/chrome/browser/prerender/prerender_local_predictor.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_database.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/page_transition_types.h"
@@ -308,7 +309,7 @@ HistoryService* PrerenderLocalPredictor::GetHistoryIfExists() const {
Profile* profile = prerender_manager_->profile();
if (!profile)
return NULL;
- return profile->GetHistoryServiceWithoutCreating();
+ return HistoryServiceFactory::GetForProfileIfExists(profile);
}
void PrerenderLocalPredictor::Init() {