| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(url::kHttpScheme); | 311 RegisterWebSafeScheme(url::kHttpScheme); |
| 312 RegisterWebSafeScheme(url::kHttpsScheme); | 312 RegisterWebSafeScheme(url::kHttpsScheme); |
| 313 RegisterWebSafeScheme(url::kFtpScheme); | 313 RegisterWebSafeScheme(url::kFtpScheme); |
| 314 RegisterWebSafeScheme(url::kDataScheme); | 314 RegisterWebSafeScheme(url::kDataScheme); |
| 315 RegisterWebSafeScheme("feed"); | 315 RegisterWebSafeScheme("feed"); |
| 316 RegisterWebSafeScheme(url::kBlobScheme); | 316 RegisterWebSafeScheme(url::kBlobScheme); |
| 317 RegisterWebSafeScheme(url::kFileSystemScheme); | 317 RegisterWebSafeScheme(url::kFileSystemScheme); |
| 318 RegisterWebSafeScheme(kResourceScheme); |
| 318 | 319 |
| 319 // We know about the following pseudo schemes and treat them specially. | 320 // We know about the following pseudo schemes and treat them specially. |
| 320 RegisterPseudoScheme(url::kAboutScheme); | 321 RegisterPseudoScheme(url::kAboutScheme); |
| 321 RegisterPseudoScheme(url::kJavaScriptScheme); | 322 RegisterPseudoScheme(url::kJavaScriptScheme); |
| 322 RegisterPseudoScheme(kViewSourceScheme); | 323 RegisterPseudoScheme(kViewSourceScheme); |
| 323 } | 324 } |
| 324 | 325 |
| 325 ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() { | 326 ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() { |
| 326 web_safe_schemes_.clear(); | 327 web_safe_schemes_.clear(); |
| 327 pseudo_schemes_.clear(); | 328 pseudo_schemes_.clear(); |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 base::AutoLock lock(lock_); | 888 base::AutoLock lock(lock_); |
| 888 | 889 |
| 889 SecurityStateMap::iterator state = security_state_.find(child_id); | 890 SecurityStateMap::iterator state = security_state_.find(child_id); |
| 890 if (state == security_state_.end()) | 891 if (state == security_state_.end()) |
| 891 return false; | 892 return false; |
| 892 | 893 |
| 893 return state->second->can_send_midi_sysex(); | 894 return state->second->can_send_midi_sysex(); |
| 894 } | 895 } |
| 895 | 896 |
| 896 } // namespace content | 897 } // namespace content |
| OLD | NEW |