| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken("FileAPI")); | 59 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken("FileAPI")); |
| 60 | 60 |
| 61 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners( | 61 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners( |
| 62 new fileapi::FileSystemTaskRunners( | 62 new fileapi::FileSystemTaskRunners( |
| 63 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), | 63 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), |
| 64 file_task_runner.get())); | 64 file_task_runner.get())); |
| 65 | 65 |
| 66 // Setting up additional mount point providers. | 66 // Setting up additional mount point providers. |
| 67 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; | 67 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; |
| 68 GetContentClient()->browser()->GetAdditionalFileSystemMountPointProviders( | 68 GetContentClient()->browser()->GetAdditionalFileSystemMountPointProviders( |
| 69 profile_path, &additional_providers); | 69 profile_path, |
| 70 special_storage_policy, |
| 71 external_mount_points, |
| 72 &additional_providers); |
| 70 | 73 |
| 71 return new fileapi::FileSystemContext( | 74 return new fileapi::FileSystemContext( |
| 72 task_runners.Pass(), | 75 task_runners.Pass(), |
| 73 external_mount_points, | 76 external_mount_points, |
| 74 special_storage_policy, | 77 special_storage_policy, |
| 75 quota_manager_proxy, | 78 quota_manager_proxy, |
| 76 additional_providers.Pass(), | 79 additional_providers.Pass(), |
| 77 profile_path, | 80 profile_path, |
| 78 CreateBrowserFileSystemOptions(is_incognito)); | 81 CreateBrowserFileSystemOptions(is_incognito)); |
| 79 } | 82 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // for the file. (We first need to check if it can already be read not to | 157 // for the file. (We first need to check if it can already be read not to |
| 155 // overwrite existing permissions) | 158 // overwrite existing permissions) |
| 156 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( | 159 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( |
| 157 process_id, *platform_path)) { | 160 process_id, *platform_path)) { |
| 158 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( | 161 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( |
| 159 process_id, *platform_path); | 162 process_id, *platform_path); |
| 160 } | 163 } |
| 161 } | 164 } |
| 162 | 165 |
| 163 } // namespace content | 166 } // namespace content |
| OLD | NEW |