diff options
author | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 16:35:49 +0000 |
---|---|---|
committer | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 16:35:49 +0000 |
commit | 18ba2b1b755ee5964255b81297698f395722bf7a (patch) | |
tree | 334d61713d7f6910d8d6fd928a889df550d4bce7 /content | |
parent | 34b43737cc9e993301528549cc2e17837e9c5674 (diff) | |
download | chromium_src-18ba2b1b755ee5964255b81297698f395722bf7a.zip chromium_src-18ba2b1b755ee5964255b81297698f395722bf7a.tar.gz chromium_src-18ba2b1b755ee5964255b81297698f395722bf7a.tar.bz2 |
Prevent changes to NavigationEntry's URL for a provisional redirect.
BUG=77786
TEST=Visit a page that redirects on reload, then stop before it finishes.
Review URL: http://codereview.chromium.org/6793029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/tab_contents/tab_contents.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 5ae27de..d4ea97e 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -1198,6 +1198,9 @@ void TabContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, void TabContents::OnDidRedirectProvisionalLoad(int32 page_id, const GURL& source_url, const GURL& target_url) { + // TODO(creis): Remove this method and have the pre-rendering code listen to + // the ResourceDispatcherHost's RESOURCE_RECEIVED_REDIRECT notification + // instead. See http://crbug.com/78512. NavigationEntry* entry; if (page_id == -1) entry = controller_.pending_entry(); @@ -1205,7 +1208,6 @@ void TabContents::OnDidRedirectProvisionalLoad(int32 page_id, entry = controller_.GetEntryWithPageID(GetSiteInstance(), page_id); if (!entry || entry->url() != source_url) return; - entry->set_url(target_url); // Notify observers about the provisional change in the main frame URL. FOR_EACH_OBSERVER(TabContentsObserver, observers_, |