diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 22:42:47 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-13 22:42:47 +0000 |
commit | cbab76d1c74c93837bc76298d1a2e43646154194 (patch) | |
tree | 7f1bdcd891e670b67eeac2993730c580698048eb /chrome/browser/web_contents.cc | |
parent | 3c1e4d080a8e69fb973638d1360d4d5dd0d2e4d5 (diff) | |
download | chromium_src-cbab76d1c74c93837bc76298d1a2e43646154194.zip chromium_src-cbab76d1c74c93837bc76298d1a2e43646154194.tar.gz chromium_src-cbab76d1c74c93837bc76298d1a2e43646154194.tar.bz2 |
This is the first pass at refactoring the interstitial page.
The SSL and malware blocking pages were doing similar things in 2 different classes.
There is now a base class called InterstitialPage that contains the common logic.
As part of that refactoring, the safe browsing was changed so that the SafeBrowsingBlockingPage is only used from the UI thread.
This CL also adds transient entries to the navigation controller: that type of entry gets deleted as soon as a navigation occurs. It is used by interstitial that need to create such a temporary entry while they show.
BUG=3013
TEST=Run the unit tests and ui tests.
Review URL: http://codereview.chromium.org/6311
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.cc')
-rw-r--r-- | chrome/browser/web_contents.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 723aa4f..4f2d259 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -17,7 +17,7 @@ #include "chrome/browser/find_in_page_controller.h" #include "chrome/browser/find_notification_details.h" #include "chrome/browser/google_util.h" -#include "chrome/browser/interstitial_page_delegate.h" +#include "chrome/browser/interstitial_page.h" #include "chrome/browser/js_before_unload_handler.h" #include "chrome/browser/jsmessage_box_handler.h" #include "chrome/browser/load_from_memory_cache_details.h" @@ -1007,9 +1007,9 @@ void WebContents::UpdateTitle(RenderViewHost* rvh, (rvh == render_view_host())) { // We are showing an interstitial page in a different RenderViewHost, so // the page_id is not sufficient to find the entry from the controller. - // (both RenderViewHost page_ids overlap). We know it is the last entry, + // (both RenderViewHost page_ids overlap). We know it is the active entry, // so just use that. - entry = controller()->GetLastCommittedEntry(); + entry = controller()->GetActiveEntry(); } else { entry = controller()->GetEntryWithPageID(type(), GetSiteInstance(), page_id); @@ -1176,7 +1176,7 @@ void WebContents::DidFailProvisionalLoadWithError( // before the page loaded so that the discard would discard the wrong entry. NavigationEntry* pending_entry = controller()->GetPendingEntry(); if (pending_entry && pending_entry->url() == url) - controller()->DiscardPendingEntry(); + controller()->DiscardNonCommittedEntries(); render_manager_.RendererAbortedProvisionalLoad(render_view_host); } |