| 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 <vector> | 7 #include <vector> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 FileSystemOptions::ProfileMode profile_mode = | 36 FileSystemOptions::ProfileMode profile_mode = |
| 37 is_incognito ? FileSystemOptions::PROFILE_MODE_INCOGNITO | 37 is_incognito ? FileSystemOptions::PROFILE_MODE_INCOGNITO |
| 38 : FileSystemOptions::PROFILE_MODE_NORMAL; | 38 : FileSystemOptions::PROFILE_MODE_NORMAL; |
| 39 return FileSystemOptions(profile_mode, additional_allowed_schemes); | 39 return FileSystemOptions(profile_mode, additional_allowed_schemes); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // anonymous namespace | 42 } // anonymous namespace |
| 43 | 43 |
| 44 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( | 44 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( |
| 45 const FilePath& profile_path, bool is_incognito, | 45 const base::FilePath& profile_path, bool is_incognito, |
| 46 fileapi::ExternalMountPoints* external_mount_points, | 46 fileapi::ExternalMountPoints* external_mount_points, |
| 47 quota::SpecialStoragePolicy* special_storage_policy, | 47 quota::SpecialStoragePolicy* special_storage_policy, |
| 48 quota::QuotaManagerProxy* quota_manager_proxy) { | 48 quota::QuotaManagerProxy* quota_manager_proxy) { |
| 49 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | 49 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); |
| 50 base::SequencedWorkerPool::SequenceToken media_sequence_token = | 50 base::SequencedWorkerPool::SequenceToken media_sequence_token = |
| 51 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName); | 51 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName); |
| 52 | 52 |
| 53 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners( | 53 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners( |
| 54 new fileapi::FileSystemTaskRunners( | 54 new fileapi::FileSystemTaskRunners( |
| 55 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 55 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 56 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 56 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 57 pool->GetSequencedTaskRunner(media_sequence_token))); | 57 pool->GetSequencedTaskRunner(media_sequence_token))); |
| 58 | 58 |
| 59 return new fileapi::FileSystemContext( | 59 return new fileapi::FileSystemContext( |
| 60 task_runners.Pass(), | 60 task_runners.Pass(), |
| 61 external_mount_points, | 61 external_mount_points, |
| 62 special_storage_policy, | 62 special_storage_policy, |
| 63 quota_manager_proxy, | 63 quota_manager_proxy, |
| 64 profile_path, | 64 profile_path, |
| 65 CreateBrowserFileSystemOptions(is_incognito)); | 65 CreateBrowserFileSystemOptions(is_incognito)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace content | 68 } // namespace content |
| OLD | NEW |