| 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 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 | 2299 |
| 2300 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2300 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
| 2301 std::vector<std::string>* additional_allowed_schemes) { | 2301 std::vector<std::string>* additional_allowed_schemes) { |
| 2302 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2302 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
| 2303 additional_allowed_schemes); | 2303 additional_allowed_schemes); |
| 2304 additional_allowed_schemes->push_back(kChromeUIScheme); | 2304 additional_allowed_schemes->push_back(kChromeUIScheme); |
| 2305 additional_allowed_schemes->push_back(extensions::kExtensionScheme); | 2305 additional_allowed_schemes->push_back(extensions::kExtensionScheme); |
| 2306 } | 2306 } |
| 2307 | 2307 |
| 2308 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( | 2308 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( |
| 2309 content::BrowserContext* browser_context, |
| 2309 const base::FilePath& storage_partition_path, | 2310 const base::FilePath& storage_partition_path, |
| 2310 quota::SpecialStoragePolicy* special_storage_policy, | |
| 2311 fileapi::ExternalMountPoints* external_mount_points, | |
| 2312 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { | 2311 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { |
| 2313 #if !defined(OS_ANDROID) | 2312 #if !defined(OS_ANDROID) |
| 2314 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 2313 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 2315 additional_backends->push_back(new MediaFileSystemBackend( | 2314 additional_backends->push_back(new MediaFileSystemBackend( |
| 2316 storage_partition_path, | 2315 storage_partition_path, |
| 2317 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( | 2316 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( |
| 2318 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); | 2317 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); |
| 2319 #endif | 2318 #endif |
| 2320 #if defined(OS_CHROMEOS) | 2319 #if defined(OS_CHROMEOS) |
| 2320 fileapi::ExternalMountPoints* external_mount_points = |
| 2321 content::BrowserContext::GetMountPoints(browser_context); |
| 2321 DCHECK(external_mount_points); | 2322 DCHECK(external_mount_points); |
| 2322 chromeos::FileSystemBackend* backend = | 2323 chromeos::FileSystemBackend* backend = |
| 2323 new chromeos::FileSystemBackend( | 2324 new chromeos::FileSystemBackend( |
| 2324 new drive::FileSystemBackendDelegate(external_mount_points), | 2325 new drive::FileSystemBackendDelegate(browser_context), |
| 2325 special_storage_policy, | 2326 browser_context->GetSpecialStoragePolicy(), |
| 2326 external_mount_points, | 2327 external_mount_points, |
| 2327 fileapi::ExternalMountPoints::GetSystemInstance()); | 2328 fileapi::ExternalMountPoints::GetSystemInstance()); |
| 2328 backend->AddSystemMountPoints(); | 2329 backend->AddSystemMountPoints(); |
| 2329 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); | 2330 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); |
| 2330 additional_backends->push_back(backend); | 2331 additional_backends->push_back(backend); |
| 2331 #endif | 2332 #endif |
| 2332 } | 2333 } |
| 2333 | 2334 |
| 2334 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2335 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 2335 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2336 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 #if defined(USE_NSS) | 2432 #if defined(USE_NSS) |
| 2432 crypto::CryptoModuleBlockingPasswordDelegate* | 2433 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2433 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2434 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2434 const GURL& url) { | 2435 const GURL& url) { |
| 2435 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2436 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2436 chrome::kCryptoModulePasswordKeygen, url.host()); | 2437 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2437 } | 2438 } |
| 2438 #endif | 2439 #endif |
| 2439 | 2440 |
| 2440 } // namespace chrome | 2441 } // namespace chrome |
| OLD | NEW |