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" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/threading/sequenced_worker_pool.h" | |
12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
14 #include "webkit/fileapi/file_system_options.h" | 15 #include "webkit/fileapi/file_system_options.h" |
15 #include "webkit/quota/quota_manager.h" | 16 #include "webkit/quota/quota_manager.h" |
16 | 17 |
17 using content::BrowserThread; | 18 using content::BrowserThread; |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 const char kChromeScheme[] = "chrome"; | 22 const char kChromeScheme[] = "chrome"; |
(...skipping 14 matching lines...) Expand all Loading... | |
36 : FileSystemOptions::PROFILE_MODE_NORMAL; | 37 : FileSystemOptions::PROFILE_MODE_NORMAL; |
37 return FileSystemOptions(profile_mode, additional_allowed_schemes); | 38 return FileSystemOptions(profile_mode, additional_allowed_schemes); |
38 } | 39 } |
39 | 40 |
40 } // anonymous namespace | 41 } // anonymous namespace |
41 | 42 |
42 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( | 43 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( |
43 const FilePath& profile_path, bool is_incognito, | 44 const FilePath& profile_path, bool is_incognito, |
44 quota::SpecialStoragePolicy* special_storage_policy, | 45 quota::SpecialStoragePolicy* special_storage_policy, |
45 quota::QuotaManagerProxy* quota_manager_proxy) { | 46 quota::QuotaManagerProxy* quota_manager_proxy) { |
47 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | |
48 base::SequencedWorkerPool::SequenceToken media_sequence_token = | |
49 pool->GetSequenceToken(); | |
50 | |
46 return new fileapi::FileSystemContext( | 51 return new fileapi::FileSystemContext( |
52 pool->GetSequencedTaskRunner(media_sequence_token), | |
kinuko
2012/08/02 21:12:46
Having this as the first argument makes me feel th
tzik
2012/08/03 22:29:18
Done.
| |
47 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 53 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
48 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 54 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
kinuko
2012/08/02 21:12:46
When we have more and more task runners this would
tzik
2012/08/03 22:29:18
Done.
| |
49 special_storage_policy, | 55 special_storage_policy, |
50 quota_manager_proxy, | 56 quota_manager_proxy, |
51 profile_path, | 57 profile_path, |
52 CreateBrowserFileSystemOptions(is_incognito)); | 58 CreateBrowserFileSystemOptions(is_incognito)); |
53 } | 59 } |
OLD | NEW |