| Index: chrome/browser/history/history_tab_helper.cc
|
| diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
|
| index 442694dab27099c938a6b67dca9043f641fce396..3900a1cbb10cb4617ed344e2bb219acd512655b5 100644
|
| --- a/chrome/browser/history/history_tab_helper.cc
|
| +++ b/chrome/browser/history/history_tab_helper.cc
|
| @@ -143,18 +143,20 @@ void HistoryTabHelper::OnPageContents(const GURL& url,
|
| void HistoryTabHelper::OnThumbnail(const GURL& url,
|
| const ThumbnailScore& score,
|
| const SkBitmap& bitmap) {
|
| - if (tab_contents()->profile()->IsOffTheRecord())
|
| + Profile* profile = static_cast<Profile*>(tab_contents()->context());
|
| + if (profile->IsOffTheRecord())
|
| return;
|
|
|
| // Tell History about this thumbnail
|
| - history::TopSites* ts = tab_contents()->profile()->GetTopSites();
|
| + history::TopSites* ts = profile->GetTopSites();
|
| if (ts)
|
| ts->SetPageThumbnail(url, bitmap, score);
|
| }
|
|
|
| HistoryService* HistoryTabHelper::GetHistoryService() {
|
| - if (tab_contents()->profile()->IsOffTheRecord())
|
| + Profile* profile = static_cast<Profile*>(tab_contents()->context());
|
| + if (profile->IsOffTheRecord())
|
| return NULL;
|
|
|
| - return tab_contents()->profile()->GetHistoryService(Profile::IMPLICIT_ACCESS);
|
| + return profile->GetHistoryService(Profile::IMPLICIT_ACCESS);
|
| }
|
|
|