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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag showing that shouldOverrideUrl cancelled the navigation Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 } 764 }
765 765
766 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( 766 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
767 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { 767 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {
768 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); 768 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
769 } 769 }
770 770
771 void RenderFrameHostImpl::OnDidFailLoadWithError( 771 void RenderFrameHostImpl::OnDidFailLoadWithError(
772 const GURL& url, 772 const GURL& url,
773 int error_code, 773 int error_code,
774 const base::string16& error_description) { 774 const base::string16& error_description,
775 bool was_ignored_by_handler) {
775 GURL validated_url(url); 776 GURL validated_url(url);
776 GetProcess()->FilterURL(false, &validated_url); 777 GetProcess()->FilterURL(false, &validated_url);
777 778
778 frame_tree_node_->navigator()->DidFailLoadWithError( 779 frame_tree_node_->navigator()->DidFailLoadWithError(
779 this, validated_url, error_code, error_description); 780 this, validated_url, error_code, error_description,
781 was_ignored_by_handler);
780 } 782 }
781 783
782 // Called when the renderer navigates. For every frame loaded, we'll get this 784 // Called when the renderer navigates. For every frame loaded, we'll get this
783 // notification containing parameters identifying the navigation. 785 // notification containing parameters identifying the navigation.
784 // 786 //
785 // Subframes are identified by the page transition type. For subframes loaded 787 // Subframes are identified by the page transition type. For subframes loaded
786 // as part of a wider page load, the page_id will be the same as for the top 788 // as part of a wider page load, the page_id will be the same as for the top
787 // level frame. If the user explicitly requests a subframe navigation, we will 789 // level frame. If the user explicitly requests a subframe navigation, we will
788 // get a new page_id because we need to create a new navigation entry for that 790 // get a new page_id because we need to create a new navigation entry for that
789 // action. 791 // action.
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 // We may be returning to an existing NavigationEntry that had been granted 2071 // We may be returning to an existing NavigationEntry that had been granted
2070 // file access. If this is a different process, we will need to grant the 2072 // file access. If this is a different process, we will need to grant the
2071 // access again. The files listed in the page state are validated when they 2073 // access again. The files listed in the page state are validated when they
2072 // are received from the renderer to prevent abuse. 2074 // are received from the renderer to prevent abuse.
2073 if (request_params.page_state.IsValid()) { 2075 if (request_params.page_state.IsValid()) {
2074 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); 2076 render_view_host_->GrantFileAccessFromPageState(request_params.page_state);
2075 } 2077 }
2076 } 2078 }
2077 2079
2078 } // namespace content 2080 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698