| OLD | NEW |
| 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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 } | 765 } |
| 766 | 766 |
| 767 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( | 767 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
| 768 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { | 768 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
| 769 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); | 769 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void RenderFrameHostImpl::OnDidFailLoadWithError( | 772 void RenderFrameHostImpl::OnDidFailLoadWithError( |
| 773 const GURL& url, | 773 const GURL& url, |
| 774 int error_code, | 774 int error_code, |
| 775 const base::string16& error_description) { | 775 const base::string16& error_description, |
| 776 bool was_ignored_by_handler) { |
| 776 GURL validated_url(url); | 777 GURL validated_url(url); |
| 777 GetProcess()->FilterURL(false, &validated_url); | 778 GetProcess()->FilterURL(false, &validated_url); |
| 778 | 779 |
| 779 frame_tree_node_->navigator()->DidFailLoadWithError( | 780 frame_tree_node_->navigator()->DidFailLoadWithError( |
| 780 this, validated_url, error_code, error_description); | 781 this, validated_url, error_code, error_description, |
| 782 was_ignored_by_handler); |
| 781 } | 783 } |
| 782 | 784 |
| 783 // Called when the renderer navigates. For every frame loaded, we'll get this | 785 // Called when the renderer navigates. For every frame loaded, we'll get this |
| 784 // notification containing parameters identifying the navigation. | 786 // notification containing parameters identifying the navigation. |
| 785 // | 787 // |
| 786 // Subframes are identified by the page transition type. For subframes loaded | 788 // Subframes are identified by the page transition type. For subframes loaded |
| 787 // as part of a wider page load, the page_id will be the same as for the top | 789 // as part of a wider page load, the page_id will be the same as for the top |
| 788 // level frame. If the user explicitly requests a subframe navigation, we will | 790 // level frame. If the user explicitly requests a subframe navigation, we will |
| 789 // get a new page_id because we need to create a new navigation entry for that | 791 // get a new page_id because we need to create a new navigation entry for that |
| 790 // action. | 792 // action. |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 // We may be returning to an existing NavigationEntry that had been granted | 2100 // We may be returning to an existing NavigationEntry that had been granted |
| 2099 // file access. If this is a different process, we will need to grant the | 2101 // file access. If this is a different process, we will need to grant the |
| 2100 // access again. The files listed in the page state are validated when they | 2102 // access again. The files listed in the page state are validated when they |
| 2101 // are received from the renderer to prevent abuse. | 2103 // are received from the renderer to prevent abuse. |
| 2102 if (request_params.page_state.IsValid()) { | 2104 if (request_params.page_state.IsValid()) { |
| 2103 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2105 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
| 2104 } | 2106 } |
| 2105 } | 2107 } |
| 2106 | 2108 |
| 2107 } // namespace content | 2109 } // namespace content |
| OLD | NEW |