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

Unified Diff: chrome/browser/history/history_tab_helper.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698