| Index: chrome/browser/favicon/favicon_tab_helper.cc
|
| diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
|
| index 11b756f4cd35440d571f2103b0a693dd5aa6bc53..b8e443083b1863ee995f9c1c3b5d33b459f9d5f2 100644
|
| --- a/chrome/browser/favicon/favicon_tab_helper.cc
|
| +++ b/chrome/browser/favicon/favicon_tab_helper.cc
|
| @@ -22,10 +22,11 @@
|
|
|
| FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents)
|
| : TabContentsObserver(tab_contents) {
|
| - favicon_handler_.reset(new FaviconHandler(tab_contents->profile(), this,
|
| + Profile* profile = static_cast<Profile*>(tab_contents->context());
|
| + favicon_handler_.reset(new FaviconHandler(profile, this,
|
| FaviconHandler::FAVICON));
|
| if (chrome::kEnableTouchIcon)
|
| - touch_icon_handler_.reset(new FaviconHandler(tab_contents->profile(), this,
|
| + touch_icon_handler_.reset(new FaviconHandler(profile, this,
|
| FaviconHandler::TOUCH));
|
| }
|
|
|
| @@ -84,13 +85,14 @@ void FaviconTabHelper::SaveFavicon() {
|
|
|
| // Make sure the page is in history, otherwise adding the favicon does
|
| // nothing.
|
| - HistoryService* history = tab_contents()->profile()->
|
| + Profile* profile = static_cast<Profile*>(tab_contents()->context());
|
| + HistoryService* history = profile->
|
| GetOriginalProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
|
| if (!history)
|
| return;
|
| history->AddPageNoVisitForBookmark(entry->url());
|
|
|
| - FaviconService* service = tab_contents()->profile()->
|
| + FaviconService* service = profile->
|
| GetOriginalProfile()->GetFaviconService(Profile::IMPLICIT_ACCESS);
|
| if (!service)
|
| return;
|
| @@ -147,10 +149,11 @@ void FaviconTabHelper::NotifyFaviconUpdated() {
|
| void FaviconTabHelper::NavigateToPendingEntry(
|
| const GURL& url,
|
| NavigationController::ReloadType reload_type) {
|
| + Profile* profile = static_cast<Profile*>(tab_contents()->context());
|
| if (reload_type != NavigationController::NO_RELOAD &&
|
| - !tab_contents()->profile()->IsOffTheRecord()) {
|
| + !profile->IsOffTheRecord()) {
|
| FaviconService* favicon_service =
|
| - tab_contents()->profile()->GetFaviconService(Profile::IMPLICIT_ACCESS);
|
| + profile->GetFaviconService(Profile::IMPLICIT_ACCESS);
|
| if (favicon_service)
|
| favicon_service->SetFaviconOutOfDateForPage(url);
|
| }
|
|
|