Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index 29ce316e0cb222fd21eb813114712d1f1a66bddd..c862b83fb3e181047b823a4fafd296c4949ed704 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -1983,18 +1983,10 @@ |
void RenderFrameImpl::didAccessInitialDocument(blink::WebLocalFrame* frame) { |
DCHECK(!frame_ || frame_ == frame); |
- // If the request hasn't yet committed, notify the browser process that it is |
- // no longer safe to show the pending URL of the main frame, since a URL spoof |
- // is now possible. (If the request has committed, the browser already knows.) |
- if (!frame->parent()) { |
- DocumentState* document_state = |
- DocumentState::FromDataSource(frame->dataSource()); |
- NavigationState* navigation_state = document_state->navigation_state(); |
- |
- if (!navigation_state->request_committed()) { |
- Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); |
- } |
- } |
+ // Notify the browser process that it is no longer safe to show the pending |
+ // URL of the main frame, since a URL spoof is now possible. |
+ if (!frame->parent() && render_view_->page_id_ == -1) |
+ Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); |
} |
// TODO(alexmos): Remove once Blink is updated to use the version that takes |