diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-16 21:00:48 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-16 21:00:48 +0000 |
commit | 447c79c28fa36d23081359920e45c810eca94dfe (patch) | |
tree | ce29d19af3d2a745019ee9f10e387c27e1860936 /chrome/browser/navigation_controller.cc | |
parent | e57d57f04228aee2cfe96a598669f8e0b1662f09 (diff) | |
download | chromium_src-447c79c28fa36d23081359920e45c810eca94dfe.zip chromium_src-447c79c28fa36d23081359920e45c810eca94dfe.tar.gz chromium_src-447c79c28fa36d23081359920e45c810eca94dfe.tar.bz2 |
Remove the rest of the alternate nav url fetcher from the navigation controller.
This changes the memory model around a bit, and it's not the most clear thing
ever, not that it was before. The alternate URL fetcher is now responsible for
deleting itself in most cases.
BUG=2370 (Assertion when using the alternate URL tracker twice in a row)
BUG=1324500 (Move the AlternateNavURLFetcher logic out of NavigationController)
Review URL: http://codereview.chromium.org/2905
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/navigation_controller.cc')
-rw-r--r-- | chrome/browser/navigation_controller.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/chrome/browser/navigation_controller.cc b/chrome/browser/navigation_controller.cc index e7e9aa9..a0dab1b 100644 --- a/chrome/browser/navigation_controller.cc +++ b/chrome/browser/navigation_controller.cc @@ -166,7 +166,6 @@ NavigationController::NavigationController(TabContents* contents, pending_entry_index_(-1), max_entry_count_(kMaxEntryCount), active_contents_(contents), - alternate_nav_url_fetcher_entry_unique_id_(0), max_restored_page_id_(-1), ssl_manager_(this, NULL), needs_reload_(false), @@ -187,7 +186,6 @@ NavigationController::NavigationController( pending_entry_index_(-1), max_entry_count_(kMaxEntryCount), active_contents_(NULL), - alternate_nav_url_fetcher_entry_unique_id_(0), max_restored_page_id_(-1), ssl_manager_(this, NULL), needs_reload_(true), @@ -488,14 +486,6 @@ const SkBitmap& NavigationController::GetLazyFavIcon() const { } } -void NavigationController::SetAlternateNavURLFetcher( - AlternateNavURLFetcher* alternate_nav_url_fetcher) { - DCHECK(!alternate_nav_url_fetcher_.get()); - DCHECK(pending_entry_); - alternate_nav_url_fetcher_.reset(alternate_nav_url_fetcher); - alternate_nav_url_fetcher_entry_unique_id_ = pending_entry_->unique_id(); -} - bool NavigationController::RendererDidNavigate( const ViewHostMsg_FrameNavigate_Params& params, bool is_interstitial, @@ -1013,18 +1003,6 @@ void NavigationController::NavigateToPendingEntry(bool reload) { void NavigationController::NotifyNavigationEntryCommitted( LoadCommittedDetails* details) { - // Reset the Alternate Nav URL Fetcher if we're loading some page it doesn't - // care about. We must do this before calling Notify() below as that may - // result in the creation of a new fetcher. - // - // TODO(brettw) bug 1324500: this logic should be moved out of the controller! - const NavigationEntry* const entry = GetActiveEntry(); - if (!entry || - (entry->unique_id() != alternate_nav_url_fetcher_entry_unique_id_)) { - alternate_nav_url_fetcher_.reset(); - alternate_nav_url_fetcher_entry_unique_id_ = 0; - } - // TODO(pkasting): http://b/1113079 Probably these explicit notification paths // should be removed, and interested parties should just listen for the // notification below instead. |