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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 324403007: Remove RenderViewImpl::FrameDidCommitProvisionalLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 438fe80673a6cba2a85a9221211ed6a6ebd6d2b5..87724cdba54d3201bbf98c20e476fa19a7c638ba 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1967,7 +1967,7 @@ void RenderFrameImpl::didCommitProvisionalLoad(
// UpdateSessionHistory and update page_id_ even in this case, so that
// the current entry gets a state update and so that we don't send a
// state update to the wrong entry when we swap back in.
- if (render_view_->GetLoadingUrl(frame) != GURL(kSwappedOutURL)) {
+ if (GetLoadingUrl() != GURL(kSwappedOutURL)) {
// Advance our offset in session history, applying the length limit.
// There is now no forward history.
render_view_->history_list_offset_++;
@@ -2010,10 +2010,20 @@ void RenderFrameImpl::didCommitProvisionalLoad(
}
}
- render_view_->FrameDidCommitProvisionalLoad(frame, is_new_navigation);
+ FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_,
+ DidCommitProvisionalLoad(frame, is_new_navigation));
FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
DidCommitProvisionalLoad(is_new_navigation));
+ if (!frame->parent()) { // Only for top frames.
+ RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
+ if (render_thread_impl) { // Can be NULL in tests.
+ render_thread_impl->histogram_customizer()->
+ RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(),
+ RenderViewImpl::GetRenderViewCount());
+ }
+ }
+
// Remember that we've already processed this request, so we don't update
// the session history again. We do this regardless of whether this is
// a session history navigation, because if we attempted a session history
@@ -2962,7 +2972,7 @@ void RenderFrameImpl::UpdateURL(blink::WebFrame* frame) {
params.security_info = response.securityInfo();
// Set the URL to be displayed in the browser UI to the user.
- params.url = render_view_->GetLoadingUrl(frame);
+ params.url = GetLoadingUrl();
DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL));
if (frame->document().baseURL() != params.url)
@@ -3506,6 +3516,15 @@ RenderFrameImpl::CreateRendererFactory() {
#endif
}
+GURL RenderFrameImpl::GetLoadingUrl() const {
+ WebDataSource* ds = frame_->dataSource();
+ if (ds->hasUnreachableURL())
+ return ds->unreachableURL();
+
+ const WebURLRequest& request = ds->request();
+ return request.url();
+}
+
#if defined(OS_ANDROID)
WebMediaPlayer* RenderFrameImpl::CreateAndroidWebMediaPlayer(
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698