From 59b49a66c3cd959fcf9d7b4bd9c6d88c70b39919 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Sat, 18 Apr 2009 18:09:36 +0000 Subject: Fix the ownership model of TabContents and NavigationController. Previously the NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Review URL: http://codereview.chromium.org/69043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14005 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/fav_icon_helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chrome/browser/fav_icon_helper.cc') diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc index 3b23e3b..a3c3fcc 100644 --- a/chrome/browser/fav_icon_helper.cc +++ b/chrome/browser/fav_icon_helper.cc @@ -129,7 +129,7 @@ void FavIconHelper::UpdateFavIcon(NavigationEntry* entry, } NavigationEntry* FavIconHelper::GetEntry() { - NavigationEntry* entry = web_contents_->controller()->GetActiveEntry(); + NavigationEntry* entry = web_contents_->controller().GetActiveEntry(); if (entry && entry->url() == url_ && web_contents_->IsActiveEntry(entry->page_id())) { return entry; -- cgit v1.1