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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 #include "net/base/escape.h" | 130 #include "net/base/escape.h" |
131 #include "net/base/mime_util.h" | 131 #include "net/base/mime_util.h" |
132 #include "net/cookies/canonical_cookie.h" | 132 #include "net/cookies/canonical_cookie.h" |
133 #include "net/cookies/cookie_options.h" | 133 #include "net/cookies/cookie_options.h" |
134 #include "net/ssl/ssl_cert_request_info.h" | 134 #include "net/ssl/ssl_cert_request_info.h" |
135 #include "ppapi/host/ppapi_host.h" | 135 #include "ppapi/host/ppapi_host.h" |
136 #include "ui/base/l10n/l10n_util.h" | 136 #include "ui/base/l10n/l10n_util.h" |
137 #include "ui/base/resource/resource_bundle.h" | 137 #include "ui/base/resource/resource_bundle.h" |
138 #include "ui/message_center/message_center_util.h" | 138 #include "ui/message_center/message_center_util.h" |
139 #include "webkit/browser/fileapi/external_mount_points.h" | 139 #include "webkit/browser/fileapi/external_mount_points.h" |
| 140 #include "webkit/browser/fileapi/file_system_task_runners.h" |
| 141 #include "webkit/browser/fileapi/syncable/syncable_sandbox_mount_point_provider.
h" |
| 142 #include "webkit/browser/quota/quota_manager.h" |
140 #include "webkit/common/webpreferences.h" | 143 #include "webkit/common/webpreferences.h" |
141 #include "webkit/plugins/plugin_switches.h" | 144 #include "webkit/plugins/plugin_switches.h" |
142 | 145 |
143 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
144 #include "chrome/browser/chrome_browser_main_win.h" | 147 #include "chrome/browser/chrome_browser_main_win.h" |
145 #include "sandbox/win/src/sandbox_policy.h" | 148 #include "sandbox/win/src/sandbox_policy.h" |
146 #elif defined(OS_MACOSX) | 149 #elif defined(OS_MACOSX) |
147 #include "chrome/browser/chrome_browser_main_mac.h" | 150 #include "chrome/browser/chrome_browser_main_mac.h" |
148 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 151 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
149 #elif defined(OS_CHROMEOS) | 152 #elif defined(OS_CHROMEOS) |
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2301 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
2299 additional_allowed_schemes); | 2302 additional_allowed_schemes); |
2300 additional_allowed_schemes->push_back(kChromeUIScheme); | 2303 additional_allowed_schemes->push_back(kChromeUIScheme); |
2301 additional_allowed_schemes->push_back(extensions::kExtensionScheme); | 2304 additional_allowed_schemes->push_back(extensions::kExtensionScheme); |
2302 } | 2305 } |
2303 | 2306 |
2304 void ChromeContentBrowserClient::GetAdditionalFileSystemMountPointProviders( | 2307 void ChromeContentBrowserClient::GetAdditionalFileSystemMountPointProviders( |
2305 const base::FilePath& storage_partition_path, | 2308 const base::FilePath& storage_partition_path, |
2306 quota::SpecialStoragePolicy* special_storage_policy, | 2309 quota::SpecialStoragePolicy* special_storage_policy, |
2307 fileapi::ExternalMountPoints* external_mount_points, | 2310 fileapi::ExternalMountPoints* external_mount_points, |
| 2311 quota::QuotaManagerProxy* quota_manager_proxy, |
| 2312 fileapi::FileSystemTaskRunners* task_runners, |
| 2313 const fileapi::FileSystemOptions& options, |
2308 ScopedVector<fileapi::FileSystemMountPointProvider>* additional_providers) { | 2314 ScopedVector<fileapi::FileSystemMountPointProvider>* additional_providers) { |
2309 #if !defined(OS_ANDROID) | 2315 #if !defined(OS_ANDROID) |
2310 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 2316 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
2311 additional_providers->push_back(new MediaFileSystemMountPointProvider( | 2317 additional_providers->push_back(new MediaFileSystemMountPointProvider( |
2312 storage_partition_path, | 2318 storage_partition_path, |
2313 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( | 2319 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( |
2314 MediaFileSystemMountPointProvider::kMediaTaskRunnerName)).get())); | 2320 MediaFileSystemMountPointProvider::kMediaTaskRunnerName)).get())); |
2315 #endif | 2321 #endif |
2316 #if defined(OS_CHROMEOS) | 2322 #if defined(OS_CHROMEOS) |
2317 DCHECK(external_mount_points); | 2323 DCHECK(external_mount_points); |
2318 chromeos::CrosMountPointProvider* cros_mount_provider = | 2324 chromeos::CrosMountPointProvider* cros_mount_provider = |
2319 new chromeos::CrosMountPointProvider( | 2325 new chromeos::CrosMountPointProvider( |
2320 new drive::MountPointProviderDelegate(external_mount_points), | 2326 new drive::MountPointProviderDelegate(external_mount_points), |
2321 special_storage_policy, | 2327 special_storage_policy, |
2322 external_mount_points, | 2328 external_mount_points, |
2323 fileapi::ExternalMountPoints::GetSystemInstance()); | 2329 fileapi::ExternalMountPoints::GetSystemInstance()); |
2324 cros_mount_provider->AddSystemMountPoints(); | 2330 cros_mount_provider->AddSystemMountPoints(); |
2325 DCHECK(cros_mount_provider->CanHandleType(fileapi::kFileSystemTypeExternal)); | 2331 DCHECK(cros_mount_provider->CanHandleType(fileapi::kFileSystemTypeExternal)); |
2326 additional_providers->push_back(cros_mount_provider); | 2332 additional_providers->push_back(cros_mount_provider); |
2327 #endif | 2333 #endif |
| 2334 |
| 2335 additional_providers->push_back( |
| 2336 new sync_file_system::SyncableSandboxMountPointProvider( |
| 2337 quota_manager_proxy, |
| 2338 task_runners->file_task_runner(), |
| 2339 storage_partition_path, |
| 2340 options, |
| 2341 special_storage_policy)); |
2328 } | 2342 } |
2329 | 2343 |
2330 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2344 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
2331 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2345 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2332 const CommandLine& command_line, | 2346 const CommandLine& command_line, |
2333 int child_process_id, | 2347 int child_process_id, |
2334 std::vector<FileDescriptorInfo>* mappings) { | 2348 std::vector<FileDescriptorInfo>* mappings) { |
2335 #if defined(OS_ANDROID) | 2349 #if defined(OS_ANDROID) |
2336 base::FilePath data_path; | 2350 base::FilePath data_path; |
2337 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); | 2351 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 #if defined(USE_NSS) | 2441 #if defined(USE_NSS) |
2428 crypto::CryptoModuleBlockingPasswordDelegate* | 2442 crypto::CryptoModuleBlockingPasswordDelegate* |
2429 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2443 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2430 const GURL& url) { | 2444 const GURL& url) { |
2431 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2445 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2432 chrome::kCryptoModulePasswordKeygen, url.host()); | 2446 chrome::kCryptoModulePasswordKeygen, url.host()); |
2433 } | 2447 } |
2434 #endif | 2448 #endif |
2435 | 2449 |
2436 } // namespace chrome | 2450 } // namespace chrome |
OLD | NEW |