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/fileapi/browser_file_system_helper.h" | 5 #include "content/browser/fileapi/browser_file_system_helper.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
12 #include "base/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
13 #include "base/threading/sequenced_worker_pool.h" | 15 #include "base/threading/sequenced_worker_pool.h" |
14 #include "content/browser/child_process_security_policy_impl.h" | 16 #include "content/browser/child_process_security_policy_impl.h" |
15 #include "content/public/browser/browser_context.h" | 17 #include "content/public/browser/browser_context.h" |
16 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 context->operation_runner()->SyncGetPlatformPath(url, platform_path); | 129 context->operation_runner()->SyncGetPlatformPath(url, platform_path); |
128 | 130 |
129 // The path is to be attached to URLLoader so we grant read permission | 131 // The path is to be attached to URLLoader so we grant read permission |
130 // for the file. (We need to check first because a parent directory may | 132 // for the file. (We need to check first because a parent directory may |
131 // already have the permissions and we don't need to grant it to the file.) | 133 // already have the permissions and we don't need to grant it to the file.) |
132 if (!policy->CanReadFile(process_id, *platform_path)) | 134 if (!policy->CanReadFile(process_id, *platform_path)) |
133 policy->GrantReadFile(process_id, *platform_path); | 135 policy->GrantReadFile(process_id, *platform_path); |
134 } | 136 } |
135 | 137 |
136 } // namespace content | 138 } // namespace content |
OLD | NEW |