OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_system/browser_file_system_helper.h" | 5 #include "content/browser/file_system/browser_file_system_helper.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
11 #include "webkit/quota/quota_manager.h" | 11 #include "webkit/quota/quota_manager.h" |
12 | 12 |
| 13 using content::BrowserThread; |
| 14 |
13 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( | 15 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( |
14 const FilePath& profile_path, bool is_incognito, | 16 const FilePath& profile_path, bool is_incognito, |
15 quota::SpecialStoragePolicy* special_storage_policy, | 17 quota::SpecialStoragePolicy* special_storage_policy, |
16 quota::QuotaManagerProxy* quota_manager_proxy) { | 18 quota::QuotaManagerProxy* quota_manager_proxy) { |
17 return new fileapi::FileSystemContext( | 19 return new fileapi::FileSystemContext( |
18 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 20 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
19 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 21 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
20 special_storage_policy, | 22 special_storage_policy, |
21 quota_manager_proxy, | 23 quota_manager_proxy, |
22 profile_path, | 24 profile_path, |
23 is_incognito, | 25 is_incognito, |
24 CommandLine::ForCurrentProcess()->HasSwitch( | 26 CommandLine::ForCurrentProcess()->HasSwitch( |
25 switches::kAllowFileAccessFromFiles), | 27 switches::kAllowFileAccessFromFiles), |
26 NULL); | 28 NULL); |
27 } | 29 } |
OLD | NEW |