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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.mm

Issue 10806022: 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 | « no previous file | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/history_menu_bridge.mm
===================================================================
--- chrome/browser/ui/cocoa/history_menu_bridge.mm (revision 147715)
+++ chrome/browser/ui/cocoa/history_menu_bridge.mm (working copy)
@@ -12,6 +12,7 @@
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU
#import "chrome/browser/app_controller_mac.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/page_usage_data.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_types.h"
@@ -81,7 +82,8 @@
// Check to see if the history service is ready. Because it loads async, it
// may not be ready when the Bridge is created. If this happens, register
// for a notification that tells us the HistoryService is ready.
- HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryService* hs = HistoryServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (hs != NULL && hs->BackendLoaded()) {
history_service_ = hs;
Init();
@@ -145,8 +147,8 @@
// A history service is now ready. Check to see if it's the one for the main
// profile. If so, perform final initialization.
if (type == chrome::NOTIFICATION_HISTORY_LOADED) {
- HistoryService* hs =
- profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
+ HistoryService* hs = HistoryServiceFactory::GetForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (hs != NULL && hs->BackendLoaded()) {
history_service_ = hs;
Init();
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698