| 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/platform_file.h" | 11 #include "base/platform_file.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "content/browser/site_instance_impl.h" | 14 #include "content/browser/site_instance_impl.h" |
| 15 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
| 16 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
| 17 #include "content/public/common/bindings_policy.h" | 17 #include "content/public/common/bindings_policy.h" |
| 18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
| 19 #include "content/public/common/url_constants.h" | 19 #include "content/public/common/url_constants.h" |
| 20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 21 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
| 22 #include "net/url_request/url_request.h" | 22 #include "net/url_request/url_request.h" |
| 23 #include "webkit/fileapi/isolated_context.h" | 23 #include "webkit/browser/fileapi/isolated_context.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const int kReadFilePermissions = | 29 const int kReadFilePermissions = |
| 30 base::PLATFORM_FILE_OPEN | | 30 base::PLATFORM_FILE_OPEN | |
| 31 base::PLATFORM_FILE_READ | | 31 base::PLATFORM_FILE_READ | |
| 32 base::PLATFORM_FILE_EXCLUSIVE_READ | | 32 base::PLATFORM_FILE_EXCLUSIVE_READ | |
| 33 base::PLATFORM_FILE_ASYNC; | 33 base::PLATFORM_FILE_ASYNC; |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 int permission) { | 701 int permission) { |
| 702 base::AutoLock lock(lock_); | 702 base::AutoLock lock(lock_); |
| 703 | 703 |
| 704 SecurityStateMap::iterator state = security_state_.find(child_id); | 704 SecurityStateMap::iterator state = security_state_.find(child_id); |
| 705 if (state == security_state_.end()) | 705 if (state == security_state_.end()) |
| 706 return false; | 706 return false; |
| 707 return state->second->HasPermissionsForFileSystem(filesystem_id, permission); | 707 return state->second->HasPermissionsForFileSystem(filesystem_id, permission); |
| 708 } | 708 } |
| 709 | 709 |
| 710 } // namespace content | 710 } // namespace content |
| OLD | NEW |