| 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> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 const base::FilePath& profile_path, | 55 const base::FilePath& profile_path, |
| 56 bool is_incognito, | 56 bool is_incognito, |
| 57 storage::QuotaManagerProxy* quota_manager_proxy) { | 57 storage::QuotaManagerProxy* quota_manager_proxy) { |
| 58 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | 58 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); |
| 59 scoped_refptr<base::SequencedTaskRunner> file_task_runner = | 59 scoped_refptr<base::SequencedTaskRunner> file_task_runner = |
| 60 pool->GetSequencedTaskRunnerWithShutdownBehavior( | 60 pool->GetSequencedTaskRunnerWithShutdownBehavior( |
| 61 pool->GetNamedSequenceToken("FileAPI"), | 61 pool->GetNamedSequenceToken("FileAPI"), |
| 62 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | 62 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| 63 | 63 |
| 64 // Setting up additional filesystem backends. | 64 // Setting up additional filesystem backends. |
| 65 ScopedVector<storage::FileSystemBackend> additional_backends; | 65 std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends; |
| 66 GetContentClient()->browser()->GetAdditionalFileSystemBackends( | 66 GetContentClient()->browser()->GetAdditionalFileSystemBackends( |
| 67 browser_context, | 67 browser_context, |
| 68 profile_path, | 68 profile_path, |
| 69 &additional_backends); | 69 &additional_backends); |
| 70 | 70 |
| 71 // Set up the auto mount handlers for url requests. | 71 // Set up the auto mount handlers for url requests. |
| 72 std::vector<storage::URLRequestAutoMountHandler> | 72 std::vector<storage::URLRequestAutoMountHandler> |
| 73 url_request_auto_mount_handlers; | 73 url_request_auto_mount_handlers; |
| 74 GetContentClient()->browser()->GetURLRequestAutoMountHandlers( | 74 GetContentClient()->browser()->GetURLRequestAutoMountHandlers( |
| 75 &url_request_auto_mount_handlers); | 75 &url_request_auto_mount_handlers); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 context->operation_runner()->SyncGetPlatformPath(url, platform_path); | 126 context->operation_runner()->SyncGetPlatformPath(url, platform_path); |
| 127 | 127 |
| 128 // The path is to be attached to URLLoader so we grant read permission | 128 // The path is to be attached to URLLoader so we grant read permission |
| 129 // for the file. (We need to check first because a parent directory may | 129 // for the file. (We need to check first because a parent directory may |
| 130 // already have the permissions and we don't need to grant it to the file.) | 130 // already have the permissions and we don't need to grant it to the file.) |
| 131 if (!policy->CanReadFile(process_id, *platform_path)) | 131 if (!policy->CanReadFile(process_id, *platform_path)) |
| 132 policy->GrantReadFile(process_id, *platform_path); | 132 policy->GrantReadFile(process_id, *platform_path); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace content | 135 } // namespace content |
| OLD | NEW |