| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(kHttpScheme); |
| 312 RegisterWebSafeScheme(kHttpsScheme); | 312 RegisterWebSafeScheme(kHttpsScheme); |
| 313 RegisterWebSafeScheme(kFtpScheme); | 313 RegisterWebSafeScheme(kFtpScheme); |
| 314 RegisterWebSafeScheme(chrome::kDataScheme); | 314 RegisterWebSafeScheme(chrome::kDataScheme); |
| 315 RegisterWebSafeScheme("feed"); | 315 RegisterWebSafeScheme("feed"); |
| 316 RegisterWebSafeScheme(chrome::kBlobScheme); | 316 RegisterWebSafeScheme(chrome::kBlobScheme); |
| 317 RegisterWebSafeScheme(chrome::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(chrome::kAboutScheme); | 320 RegisterPseudoScheme(chrome::kAboutScheme); |
| 321 RegisterPseudoScheme(kJavaScriptScheme); | 321 RegisterPseudoScheme(kJavaScriptScheme); |
| 322 RegisterPseudoScheme(kViewSourceScheme); | 322 RegisterPseudoScheme(kViewSourceScheme); |
| 323 } | 323 } |
| 324 | 324 |
| 325 ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() { | 325 ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() { |
| 326 web_safe_schemes_.clear(); | 326 web_safe_schemes_.clear(); |
| 327 pseudo_schemes_.clear(); | 327 pseudo_schemes_.clear(); |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 base::AutoLock lock(lock_); | 875 base::AutoLock lock(lock_); |
| 876 | 876 |
| 877 SecurityStateMap::iterator state = security_state_.find(child_id); | 877 SecurityStateMap::iterator state = security_state_.find(child_id); |
| 878 if (state == security_state_.end()) | 878 if (state == security_state_.end()) |
| 879 return false; | 879 return false; |
| 880 | 880 |
| 881 return state->second->can_send_midi_sysex(); | 881 return state->second->can_send_midi_sysex(); |
| 882 } | 882 } |
| 883 | 883 |
| 884 } // namespace content | 884 } // namespace content |
| OLD | NEW |