Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1790)

Unified Diff: chrome/browser/custom_home_pages_table_model.cc

Issue 10782004: Removing usage of profile_->GetHistory() from the codebase in order to remove that function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/browser/memory_purger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/custom_home_pages_table_model.cc
===================================================================
--- chrome/browser/custom_home_pages_table_model.cc (revision 146646)
+++ chrome/browser/custom_home_pages_table_model.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -158,8 +159,8 @@
// Cancel any pending load requests now so we don't deref a bogus pointer when
// we get the loaded notification.
if (entry->title_handle) {
- HistoryService* history_service =
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryService* history_service = HistoryServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (history_service)
history_service->CancelRequest(entry->title_handle);
}
@@ -217,8 +218,8 @@
}
void CustomHomePagesTableModel::LoadTitle(Entry* entry) {
- HistoryService* history_service =
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryService* history_service = HistoryServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (history_service) {
entry->title_handle = history_service->QueryURL(entry->url, false,
&history_query_consumer_,
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/browser/memory_purger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698