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/child_process_security_policy_impl.h" | 5 #include "content/browser/child_process_security_policy_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
883 bool ChildProcessSecurityPolicyImpl::CanSendMidiSysExMessage(int child_id) { | 883 bool ChildProcessSecurityPolicyImpl::CanSendMidiSysExMessage(int child_id) { |
884 base::AutoLock lock(lock_); | 884 base::AutoLock lock(lock_); |
885 | 885 |
886 SecurityStateMap::iterator state = security_state_.find(child_id); | 886 SecurityStateMap::iterator state = security_state_.find(child_id); |
887 if (state == security_state_.end()) | 887 if (state == security_state_.end()) |
888 return false; | 888 return false; |
889 | 889 |
890 return state->second->can_send_midi_sysex(); | 890 return state->second->can_send_midi_sysex(); |
891 } | 891 } |
892 | 892 |
893 bool ChildProcessSecurityPolicyImpl::CanRegisterServiceWorker( | |
Tom Sepez
2014/06/17 17:43:19
These don't have to live in CPSP because they don'
| |
894 const GURL& document_url, | |
895 const GURL& pattern, | |
896 const GURL& script_url) { | |
897 return document_url.GetOrigin() == pattern.GetOrigin() && | |
898 document_url.GetOrigin() == script_url.GetOrigin(); | |
michaeln
2014/06/17 23:50:30
These same-origin checks are not a matter of 'poli
| |
899 } | |
900 | |
901 bool ChildProcessSecurityPolicyImpl::CanUnregisterServiceWorker( | |
902 const GURL& document_url, | |
903 const GURL& pattern) { | |
904 return document_url.GetOrigin() == pattern.GetOrigin(); | |
905 } | |
906 | |
893 } // namespace content | 907 } // namespace content |
OLD | NEW |