| 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" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "content/browser/plugin_process_host.h" | 13 #include "content/browser/plugin_process_host.h" |
| 14 #include "content/browser/site_instance_impl.h" | 14 #include "content/browser/site_instance_impl.h" |
| 15 #include "content/public/browser/child_process_data.h" | 15 #include "content/public/browser/child_process_data.h" |
| 16 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" |
| 17 #include "content/public/browser/render_process_host.h" | 17 #include "content/public/browser/render_process_host.h" |
| 18 #include "content/public/common/bindings_policy.h" | 18 #include "content/public/common/bindings_policy.h" |
| 19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "content/public/common/url_constants.h" | 20 #include "content/public/common/url_constants.h" |
| 21 #include "net/base/filename_util.h" | 21 #include "net/base/filename_util.h" |
| 22 #include "net/url_request/url_request.h" | 22 #include "net/url_request/url_request.h" |
| 23 #include "storage/common/fileapi/file_system_util.h" |
| 23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 24 #include "webkit/browser/fileapi/file_permission_policy.h" | 25 #include "webkit/browser/fileapi/file_permission_policy.h" |
| 25 #include "webkit/browser/fileapi/file_system_url.h" | 26 #include "webkit/browser/fileapi/file_system_url.h" |
| 26 #include "webkit/browser/fileapi/isolated_context.h" | 27 #include "webkit/browser/fileapi/isolated_context.h" |
| 27 #include "webkit/common/fileapi/file_system_util.h" | |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // Used internally only. These bit positions have no relationship to any | 33 // Used internally only. These bit positions have no relationship to any |
| 34 // underlying OS and can be changed to accommodate finer-grained permissions. | 34 // underlying OS and can be changed to accommodate finer-grained permissions. |
| 35 enum ChildProcessSecurityPermissions { | 35 enum ChildProcessSecurityPermissions { |
| 36 READ_FILE_PERMISSION = 1 << 0, | 36 READ_FILE_PERMISSION = 1 << 0, |
| 37 WRITE_FILE_PERMISSION = 1 << 1, | 37 WRITE_FILE_PERMISSION = 1 << 1, |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 base::AutoLock lock(lock_); | 887 base::AutoLock lock(lock_); |
| 888 | 888 |
| 889 SecurityStateMap::iterator state = security_state_.find(child_id); | 889 SecurityStateMap::iterator state = security_state_.find(child_id); |
| 890 if (state == security_state_.end()) | 890 if (state == security_state_.end()) |
| 891 return false; | 891 return false; |
| 892 | 892 |
| 893 return state->second->can_send_midi_sysex(); | 893 return state->second->can_send_midi_sysex(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 } // namespace content | 896 } // namespace content |
| OLD | NEW |