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/file_system/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 "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "webkit/fileapi/file_system_options.h" | 14 #include "webkit/fileapi/file_system_options.h" |
15 #include "webkit/quota/quota_manager.h" | 15 #include "webkit/quota/quota_manager.h" |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const char kChromeScheme[] = "chrome"; | 21 const char kChromeScheme[] = "chrome"; |
22 const char kExtensionScheme[] = "chrome-extension"; | 22 const char kExtensionScheme[] = "chrome-extension"; |
jam
2013/02/01 03:10:38
I just saw this while looking through the code. th
| |
23 | 23 |
24 using fileapi::FileSystemOptions; | 24 using fileapi::FileSystemOptions; |
25 | 25 |
26 FileSystemOptions CreateBrowserFileSystemOptions(bool is_incognito) { | 26 FileSystemOptions CreateBrowserFileSystemOptions(bool is_incognito) { |
27 std::vector<std::string> additional_allowed_schemes; | 27 std::vector<std::string> additional_allowed_schemes; |
28 additional_allowed_schemes.push_back(kChromeScheme); | 28 additional_allowed_schemes.push_back(kChromeScheme); |
29 additional_allowed_schemes.push_back(kExtensionScheme); | 29 additional_allowed_schemes.push_back(kExtensionScheme); |
30 if (CommandLine::ForCurrentProcess()->HasSwitch( | 30 if (CommandLine::ForCurrentProcess()->HasSwitch( |
31 switches::kAllowFileAccessFromFiles)) { | 31 switches::kAllowFileAccessFromFiles)) { |
32 additional_allowed_schemes.push_back("file"); | 32 additional_allowed_schemes.push_back("file"); |
(...skipping 11 matching lines...) Expand all Loading... | |
44 quota::SpecialStoragePolicy* special_storage_policy, | 44 quota::SpecialStoragePolicy* special_storage_policy, |
45 quota::QuotaManagerProxy* quota_manager_proxy) { | 45 quota::QuotaManagerProxy* quota_manager_proxy) { |
46 return new fileapi::FileSystemContext( | 46 return new fileapi::FileSystemContext( |
47 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 47 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
48 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 48 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
49 special_storage_policy, | 49 special_storage_policy, |
50 quota_manager_proxy, | 50 quota_manager_proxy, |
51 profile_path, | 51 profile_path, |
52 CreateBrowserFileSystemOptions(is_incognito)); | 52 CreateBrowserFileSystemOptions(is_incognito)); |
53 } | 53 } |
OLD | NEW |