| Index: content/browser/child_process_security_policy_impl.cc
|
| diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
|
| index a9b54d8cfe3f82ccdb0085d3234220242e539a10..245e9d142c79198db86658fbbfeb51b13957032e 100644
|
| --- a/content/browser/child_process_security_policy_impl.cc
|
| +++ b/content/browser/child_process_security_policy_impl.cc
|
| @@ -268,6 +268,10 @@ class ChildProcessSecurityPolicyImpl::SecurityState {
|
| origin_lock_ = gurl;
|
| }
|
|
|
| + bool HasOriginLock() { return !origin_lock_.is_empty(); }
|
| +
|
| + bool IsLockedToOrigin(const GURL& gurl) { return origin_lock_ == gurl; }
|
| +
|
| bool has_web_ui_bindings() const {
|
| return enabled_bindings_ & BINDINGS_POLICY_WEB_UI;
|
| }
|
| @@ -1025,6 +1029,23 @@ void ChildProcessSecurityPolicyImpl::LockToOrigin(int child_id,
|
| state->second->LockToOrigin(gurl);
|
| }
|
|
|
| +bool ChildProcessSecurityPolicyImpl::HasOriginLock(int child_id) {
|
| + base::AutoLock lock(lock_);
|
| + SecurityStateMap::iterator state = security_state_.find(child_id);
|
| + if (state == security_state_.end())
|
| + return false;
|
| + return state->second->HasOriginLock();
|
| +}
|
| +
|
| +bool ChildProcessSecurityPolicyImpl::IsLockedToOrigin(int child_id,
|
| + const GURL& site_url) {
|
| + base::AutoLock lock(lock_);
|
| + SecurityStateMap::iterator state = security_state_.find(child_id);
|
| + if (state == security_state_.end())
|
| + return false;
|
| + return state->second->IsLockedToOrigin(site_url);
|
| +}
|
| +
|
| void ChildProcessSecurityPolicyImpl::GrantPermissionsForFileSystem(
|
| int child_id,
|
| const std::string& filesystem_id,
|
|
|