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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 GURL origin_lock_; | 301 GURL origin_lock_; |
302 | 302 |
303 // The set of isolated filesystems the child process is permitted to access. | 303 // The set of isolated filesystems the child process is permitted to access. |
304 FileSystemMap filesystem_permissions_; | 304 FileSystemMap filesystem_permissions_; |
305 | 305 |
306 DISALLOW_COPY_AND_ASSIGN(SecurityState); | 306 DISALLOW_COPY_AND_ASSIGN(SecurityState); |
307 }; | 307 }; |
308 | 308 |
309 ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() { | 309 ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() { |
310 // We know about these schemes and believe them to be safe. | 310 // We know about these schemes and believe them to be safe. |
311 RegisterWebSafeScheme(kHttpScheme); | 311 RegisterWebSafeScheme(url::kHttpScheme); |
312 RegisterWebSafeScheme(kHttpsScheme); | 312 RegisterWebSafeScheme(url::kHttpsScheme); |
313 RegisterWebSafeScheme(kFtpScheme); | 313 RegisterWebSafeScheme(kFtpScheme); |
314 RegisterWebSafeScheme(kDataScheme); | 314 RegisterWebSafeScheme(kDataScheme); |
315 RegisterWebSafeScheme("feed"); | 315 RegisterWebSafeScheme("feed"); |
316 RegisterWebSafeScheme(kBlobScheme); | 316 RegisterWebSafeScheme(kBlobScheme); |
317 RegisterWebSafeScheme(kFileSystemScheme); | 317 RegisterWebSafeScheme(kFileSystemScheme); |
318 | 318 |
319 // We know about the following pseudo schemes and treat them specially. | 319 // We know about the following pseudo schemes and treat them specially. |
320 RegisterPseudoScheme(kAboutScheme); | 320 RegisterPseudoScheme(kAboutScheme); |
321 RegisterPseudoScheme(kJavaScriptScheme); | 321 RegisterPseudoScheme(kJavaScriptScheme); |
322 RegisterPseudoScheme(kViewSourceScheme); | 322 RegisterPseudoScheme(kViewSourceScheme); |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 base::AutoLock lock(lock_); | 885 base::AutoLock lock(lock_); |
886 | 886 |
887 SecurityStateMap::iterator state = security_state_.find(child_id); | 887 SecurityStateMap::iterator state = security_state_.find(child_id); |
888 if (state == security_state_.end()) | 888 if (state == security_state_.end()) |
889 return false; | 889 return false; |
890 | 890 |
891 return state->second->can_send_midi_sysex(); | 891 return state->second->can_send_midi_sysex(); |
892 } | 892 } |
893 | 893 |
894 } // namespace content | 894 } // namespace content |
OLD | NEW |