OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1776 content::RenderViewHost* render_view_host, | 1776 content::RenderViewHost* render_view_host, |
1777 int64 frame_id, | 1777 int64 frame_id, |
1778 bool is_main_frame, | 1778 bool is_main_frame, |
1779 const GURL& opener_url, | 1779 const GURL& opener_url, |
1780 const GURL& url) { | 1780 const GURL& url) { |
1781 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL); | 1781 bool is_error_page = (url.spec() == content::kUnreachableWebDataURL); |
1782 GURL validated_url(url); | 1782 GURL validated_url(url); |
1783 GURL validated_opener_url(opener_url); | 1783 GURL validated_opener_url(opener_url); |
1784 content::RenderProcessHost* render_process_host = | 1784 content::RenderProcessHost* render_process_host = |
1785 render_view_host->GetProcess(); | 1785 render_view_host->GetProcess(); |
1786 RenderViewHostImpl::FilterURL( | 1786 RenderViewHost::FilterURL( |
1787 ChildProcessSecurityPolicyImpl::GetInstance(), | |
1788 render_process_host->GetID(), | 1787 render_process_host->GetID(), |
1789 false, | 1788 false, |
1790 &validated_url); | 1789 &validated_url); |
1791 RenderViewHostImpl::FilterURL( | 1790 RenderViewHost::FilterURL( |
1792 ChildProcessSecurityPolicyImpl::GetInstance(), | |
1793 render_process_host->GetID(), | 1791 render_process_host->GetID(), |
1794 true, | 1792 true, |
1795 &validated_opener_url); | 1793 &validated_opener_url); |
1796 | 1794 |
1797 // Notify observers about the start of the provisional load. | 1795 // Notify observers about the start of the provisional load. |
1798 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 1796 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
1799 DidStartProvisionalLoadForFrame(frame_id, is_main_frame, | 1797 DidStartProvisionalLoadForFrame(frame_id, is_main_frame, |
1800 validated_url, is_error_page, render_view_host)); | 1798 validated_url, is_error_page, render_view_host)); |
1801 | 1799 |
1802 if (is_main_frame) { | 1800 if (is_main_frame) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() | 1858 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() |
1861 << ", error_code: " << params.error_code | 1859 << ", error_code: " << params.error_code |
1862 << ", error_description: " << params.error_description | 1860 << ", error_description: " << params.error_description |
1863 << ", is_main_frame: " << params.is_main_frame | 1861 << ", is_main_frame: " << params.is_main_frame |
1864 << ", showing_repost_interstitial: " << | 1862 << ", showing_repost_interstitial: " << |
1865 params.showing_repost_interstitial | 1863 params.showing_repost_interstitial |
1866 << ", frame_id: " << params.frame_id; | 1864 << ", frame_id: " << params.frame_id; |
1867 GURL validated_url(params.url); | 1865 GURL validated_url(params.url); |
1868 content::RenderProcessHost* render_process_host = | 1866 content::RenderProcessHost* render_process_host = |
1869 render_view_host->GetProcess(); | 1867 render_view_host->GetProcess(); |
1870 RenderViewHostImpl::FilterURL( | 1868 RenderViewHost::FilterURL( |
1871 ChildProcessSecurityPolicyImpl::GetInstance(), | |
1872 render_process_host->GetID(), | 1869 render_process_host->GetID(), |
1873 false, | 1870 false, |
1874 &validated_url); | 1871 &validated_url); |
1875 | 1872 |
1876 if (net::ERR_ABORTED == params.error_code) { | 1873 if (net::ERR_ABORTED == params.error_code) { |
1877 // EVIL HACK ALERT! Ignore failed loads when we're showing interstitials. | 1874 // EVIL HACK ALERT! Ignore failed loads when we're showing interstitials. |
1878 // This means that the interstitial won't be torn down properly, which is | 1875 // This means that the interstitial won't be torn down properly, which is |
1879 // bad. But if we have an interstitial, go back to another tab type, and | 1876 // bad. But if we have an interstitial, go back to another tab type, and |
1880 // then load the same interstitial again, we could end up getting the first | 1877 // then load the same interstitial again, we could end up getting the first |
1881 // interstitial's "failed" message (as a result of the cancel) when we're on | 1878 // interstitial's "failed" message (as a result of the cancel) when we're on |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3091 browser_plugin_host()->embedder_render_process_host(); | 3088 browser_plugin_host()->embedder_render_process_host(); |
3092 *embedder_container_id = browser_plugin_host()->instance_id(); | 3089 *embedder_container_id = browser_plugin_host()->instance_id(); |
3093 int embedder_process_id = | 3090 int embedder_process_id = |
3094 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3091 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3095 if (embedder_process_id != -1) { | 3092 if (embedder_process_id != -1) { |
3096 *embedder_channel_name = | 3093 *embedder_channel_name = |
3097 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3094 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3098 embedder_process_id); | 3095 embedder_process_id); |
3099 } | 3096 } |
3100 } | 3097 } |
OLD | NEW |