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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 // local files. | 1553 // local files. |
1554 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 1554 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
1555 GetProcess()->GetID(), common_params.base_url_for_data_url); | 1555 GetProcess()->GetID(), common_params.base_url_for_data_url); |
1556 } | 1556 } |
1557 } | 1557 } |
1558 | 1558 |
1559 // We may be returning to an existing NavigationEntry that had been granted | 1559 // We may be returning to an existing NavigationEntry that had been granted |
1560 // file access. If this is a different process, we will need to grant the | 1560 // file access. If this is a different process, we will need to grant the |
1561 // access again. The files listed in the page state are validated when they | 1561 // access again. The files listed in the page state are validated when they |
1562 // are received from the renderer to prevent abuse. | 1562 // are received from the renderer to prevent abuse. |
| 1563 // TODO(creis): Make this list frame-specific. |
1563 if (history_params.page_state.IsValid()) { | 1564 if (history_params.page_state.IsValid()) { |
1564 render_view_host_->GrantFileAccessFromPageState(history_params.page_state); | 1565 render_view_host_->GrantFileAccessFromPageState(history_params.page_state); |
1565 } | 1566 } |
1566 | 1567 |
1567 // Only send the message if we aren't suspended at the start of a cross-site | 1568 // Only send the message if we aren't suspended at the start of a cross-site |
1568 // request. | 1569 // request. |
1569 if (navigations_suspended_) { | 1570 if (navigations_suspended_) { |
1570 // Shouldn't be possible to have a second navigation while suspended, since | 1571 // Shouldn't be possible to have a second navigation while suspended, since |
1571 // navigations will only be suspended during a cross-site request. If a | 1572 // navigations will only be suspended during a cross-site request. If a |
1572 // second navigation occurs, RenderFrameHostManager will cancel this pending | 1573 // second navigation occurs, RenderFrameHostManager will cancel this pending |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1971 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1971 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1972 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1972 GetContentClient()->browser()->RegisterPermissionUsage( | 1973 GetContentClient()->browser()->RegisterPermissionUsage( |
1973 PERMISSION_GEOLOCATION, | 1974 PERMISSION_GEOLOCATION, |
1974 delegate_->GetAsWebContents(), | 1975 delegate_->GetAsWebContents(), |
1975 GetLastCommittedURL().GetOrigin(), | 1976 GetLastCommittedURL().GetOrigin(), |
1976 top_frame->GetLastCommittedURL().GetOrigin()); | 1977 top_frame->GetLastCommittedURL().GetOrigin()); |
1977 } | 1978 } |
1978 | 1979 |
1979 } // namespace content | 1980 } // namespace content |
OLD | NEW |