summaryrefslogtreecommitdiffstats
path: root/chrome/browser/favicon
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 18:34:56 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 18:34:56 +0000
commitcafe4ad25440a7752f5a4d230adf29b16a4766b0 (patch)
tree125f3d638cbaf3a3db61c91904c0eddae1e8ad34 /chrome/browser/favicon
parent96561cb87ad2679df630ddc0d1561949d78bbcff (diff)
downloadchromium_src-cafe4ad25440a7752f5a4d230adf29b16a4766b0.zip
chromium_src-cafe4ad25440a7752f5a4d230adf29b16a4766b0.tar.gz
chromium_src-cafe4ad25440a7752f5a4d230adf29b16a4766b0.tar.bz2
Removal of Profile from content part 3.
BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7522018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/favicon')
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc15
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 11b756f..a7bf45d 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -21,11 +21,12 @@
#include "ui/gfx/image/image.h"
FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
- favicon_handler_.reset(new FaviconHandler(tab_contents->profile(), this,
+ : TabContentsObserver(tab_contents),
+ profile_(Profile::FromBrowserContext(tab_contents->browser_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,13 @@ void FaviconTabHelper::SaveFavicon() {
// Make sure the page is in history, otherwise adding the favicon does
// nothing.
- HistoryService* history = tab_contents()->profile()->
+ 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;
@@ -148,9 +149,9 @@ void FaviconTabHelper::NavigateToPendingEntry(
const GURL& url,
NavigationController::ReloadType reload_type) {
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);
}
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index e10005c..c236f75 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -92,6 +92,8 @@ class FaviconTabHelper : public TabContentsObserver,
bool errored,
const SkBitmap& image);
+ Profile* profile_;
+
scoped_ptr<FaviconHandler> favicon_handler_;
// Handles downloading touchicons. It is NULL if