Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2197)

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 6793029: Prevent changes to NavigationEntry's URL for a provisional redirect. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add TODO comment. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 5940baf6f9559dc025d0443abcbaeadcb2ec3387..b884a9077e9384a6a0284a7d45d2dd3012017b4b 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1303,6 +1303,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();
@@ -1310,7 +1313,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_,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698