| 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 "base/threading/sequenced_worker_pool.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
| 15 #include "webkit/fileapi/file_system_options.h" | 15 #include "webkit/fileapi/file_system_options.h" |
| 16 #include "webkit/fileapi/file_system_task_runners.h" | 16 #include "webkit/fileapi/file_system_task_runners.h" |
| 17 #include "webkit/quota/quota_manager.h" | 17 #include "webkit/quota/quota_manager.h" |
| 18 | 18 |
| 19 using content::BrowserThread; | 19 namespace content { |
| 20 | |
| 21 namespace { | 20 namespace { |
| 22 | 21 |
| 23 const char kChromeScheme[] = "chrome"; | 22 const char kChromeScheme[] = "chrome"; |
| 24 const char kExtensionScheme[] = "chrome-extension"; | 23 const char kExtensionScheme[] = "chrome-extension"; |
| 25 | 24 |
| 26 using fileapi::FileSystemOptions; | 25 using fileapi::FileSystemOptions; |
| 27 | 26 |
| 28 FileSystemOptions CreateBrowserFileSystemOptions(bool is_incognito) { | 27 FileSystemOptions CreateBrowserFileSystemOptions(bool is_incognito) { |
| 29 std::vector<std::string> additional_allowed_schemes; | 28 std::vector<std::string> additional_allowed_schemes; |
| 30 additional_allowed_schemes.push_back(kChromeScheme); | 29 additional_allowed_schemes.push_back(kChromeScheme); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 55 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 54 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 56 pool->GetSequencedTaskRunner(media_sequence_token))); | 55 pool->GetSequencedTaskRunner(media_sequence_token))); |
| 57 | 56 |
| 58 return new fileapi::FileSystemContext( | 57 return new fileapi::FileSystemContext( |
| 59 task_runners.Pass(), | 58 task_runners.Pass(), |
| 60 special_storage_policy, | 59 special_storage_policy, |
| 61 quota_manager_proxy, | 60 quota_manager_proxy, |
| 62 profile_path, | 61 profile_path, |
| 63 CreateBrowserFileSystemOptions(is_incognito)); | 62 CreateBrowserFileSystemOptions(is_incognito)); |
| 64 } | 63 } |
| 64 |
| 65 } // namespace content |
| OLD | NEW |