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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 } | 1704 } |
1705 | 1705 |
1706 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, | 1706 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, |
1707 const RenderProcessHost* process, | 1707 const RenderProcessHost* process, |
1708 bool empty_allowed, | 1708 bool empty_allowed, |
1709 GURL* url) { | 1709 GURL* url) { |
1710 if (empty_allowed && url->is_empty()) | 1710 if (empty_allowed && url->is_empty()) |
1711 return; | 1711 return; |
1712 | 1712 |
1713 // The browser process should never hear the swappedout:// URL from any | 1713 // The browser process should never hear the swappedout:// URL from any |
1714 // of the renderer's messages. Check for this in debug builds, but don't | 1714 // of the renderer's messages. Temporarily CHECK on a canary build to see if |
1715 // let it crash a release browser. | 1715 // it's still happening in the wild. |
1716 DCHECK(GURL(kSwappedOutURL) != *url); | 1716 CHECK(GURL(kSwappedOutURL) != *url); |
1717 | 1717 |
1718 if (!url->is_valid()) { | 1718 if (!url->is_valid()) { |
1719 // Have to use about:blank for the denied case, instead of an empty GURL. | 1719 // Have to use about:blank for the denied case, instead of an empty GURL. |
1720 // This is because the browser treats navigation to an empty GURL as a | 1720 // This is because the browser treats navigation to an empty GURL as a |
1721 // navigation to the home page. This is often a privileged page | 1721 // navigation to the home page. This is often a privileged page |
1722 // (chrome://newtab/) which is exactly what we don't want. | 1722 // (chrome://newtab/) which is exactly what we don't want. |
1723 *url = GURL(chrome::kAboutBlankURL); | 1723 *url = GURL(chrome::kAboutBlankURL); |
1724 return; | 1724 return; |
1725 } | 1725 } |
1726 | 1726 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 is_waiting_for_beforeunload_ack_ = false; | 2026 is_waiting_for_beforeunload_ack_ = false; |
2027 is_waiting_for_unload_ack_ = false; | 2027 is_waiting_for_unload_ack_ = false; |
2028 has_timed_out_on_unload_ = false; | 2028 has_timed_out_on_unload_ = false; |
2029 } | 2029 } |
2030 | 2030 |
2031 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 2031 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
2032 STLDeleteValues(&power_save_blockers_); | 2032 STLDeleteValues(&power_save_blockers_); |
2033 } | 2033 } |
2034 | 2034 |
2035 } // namespace content | 2035 } // namespace content |
OLD | NEW |