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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10316020: Remove WebContentsImpl::OnDidRedirectProvisionalLoad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't break unittest Created 8 years, 7 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6512414cb91ff9d77c7743da502137b597efdd2a..c71bac7936a18544086a88a69cc4d56ee92d9eb9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1781,62 +1781,6 @@ void WebContentsImpl::DidStartProvisionalLoadForFrame(
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
DidStartProvisionalLoadForFrame(frame_id, is_main_frame,
validated_url, is_error_page, render_view_host));
-
- if (is_main_frame) {
- // Notify observers about the provisional change in the main frame URL.
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- ProvisionalChangeToMainFrameUrl(validated_url,
- validated_opener_url,
- render_view_host));
- }
-}
-
-void WebContentsImpl::DidRedirectProvisionalLoad(
- content::RenderViewHost* render_view_host,
- int32 page_id,
- const GURL& opener_url,
- 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.
- GURL validated_source_url(source_url);
- GURL validated_target_url(target_url);
- GURL validated_opener_url(opener_url);
- RenderViewHostImpl* render_view_host_impl =
- static_cast<RenderViewHostImpl*>(render_view_host);
- content::RenderProcessHost* render_process_host =
- render_view_host->GetProcess();
- render_view_host_impl->FilterURL(
- ChildProcessSecurityPolicyImpl::GetInstance(),
- render_process_host->GetID(),
- false,
- &validated_source_url);
- render_view_host_impl->FilterURL(
- ChildProcessSecurityPolicyImpl::GetInstance(),
- render_process_host->GetID(),
- false,
- &validated_target_url);
- render_view_host_impl->FilterURL(
- ChildProcessSecurityPolicyImpl::GetInstance(),
- render_process_host->GetID(),
- true,
- &validated_opener_url);
- NavigationEntry* entry;
- if (page_id == -1) {
- entry = controller_.GetPendingEntry();
- } else {
- entry = controller_.GetEntryWithPageID(render_view_host->GetSiteInstance(),
- page_id);
- }
- if (!entry || entry->GetURL() != validated_source_url)
- return;
-
- // Notify observers about the provisional change in the main frame URL.
- FOR_EACH_OBSERVER(WebContentsObserver, observers_,
- ProvisionalChangeToMainFrameUrl(validated_target_url,
- validated_opener_url,
- render_view_host));
}
void WebContentsImpl::DidFailProvisionalLoadWithError(

Powered by Google App Engine
This is Rietveld 408576698