| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #include "net/base/escape.h" | 131 #include "net/base/escape.h" |
| 132 #include "net/base/mime_util.h" | 132 #include "net/base/mime_util.h" |
| 133 #include "net/cookies/canonical_cookie.h" | 133 #include "net/cookies/canonical_cookie.h" |
| 134 #include "net/cookies/cookie_options.h" | 134 #include "net/cookies/cookie_options.h" |
| 135 #include "net/ssl/ssl_cert_request_info.h" | 135 #include "net/ssl/ssl_cert_request_info.h" |
| 136 #include "ppapi/host/ppapi_host.h" | 136 #include "ppapi/host/ppapi_host.h" |
| 137 #include "ui/base/l10n/l10n_util.h" | 137 #include "ui/base/l10n/l10n_util.h" |
| 138 #include "ui/base/resource/resource_bundle.h" | 138 #include "ui/base/resource/resource_bundle.h" |
| 139 #include "ui/message_center/message_center_util.h" | 139 #include "ui/message_center/message_center_util.h" |
| 140 #include "webkit/browser/fileapi/external_mount_points.h" | 140 #include "webkit/browser/fileapi/external_mount_points.h" |
| 141 #include "webkit/browser/fileapi/file_system_options.h" |
| 142 #include "webkit/browser/fileapi/file_system_task_runners.h" |
| 143 #include "webkit/browser/fileapi/syncable/sync_file_system_backend.h" |
| 141 #include "webkit/common/webpreferences.h" | 144 #include "webkit/common/webpreferences.h" |
| 142 #include "webkit/plugins/plugin_switches.h" | 145 #include "webkit/plugins/plugin_switches.h" |
| 143 | 146 |
| 144 #if defined(OS_WIN) | 147 #if defined(OS_WIN) |
| 145 #include "chrome/browser/chrome_browser_main_win.h" | 148 #include "chrome/browser/chrome_browser_main_win.h" |
| 146 #include "sandbox/win/src/sandbox_policy.h" | 149 #include "sandbox/win/src/sandbox_policy.h" |
| 147 #elif defined(OS_MACOSX) | 150 #elif defined(OS_MACOSX) |
| 148 #include "chrome/browser/chrome_browser_main_mac.h" | 151 #include "chrome/browser/chrome_browser_main_mac.h" |
| 149 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 152 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
| 150 #elif defined(OS_CHROMEOS) | 153 #elif defined(OS_CHROMEOS) |
| (...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 std::vector<std::string>* additional_allowed_schemes) { | 2334 std::vector<std::string>* additional_allowed_schemes) { |
| 2332 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2335 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
| 2333 additional_allowed_schemes); | 2336 additional_allowed_schemes); |
| 2334 additional_allowed_schemes->push_back(kChromeUIScheme); | 2337 additional_allowed_schemes->push_back(kChromeUIScheme); |
| 2335 additional_allowed_schemes->push_back(extensions::kExtensionScheme); | 2338 additional_allowed_schemes->push_back(extensions::kExtensionScheme); |
| 2336 } | 2339 } |
| 2337 | 2340 |
| 2338 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( | 2341 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( |
| 2339 content::BrowserContext* browser_context, | 2342 content::BrowserContext* browser_context, |
| 2340 const base::FilePath& storage_partition_path, | 2343 const base::FilePath& storage_partition_path, |
| 2344 fileapi::FileSystemTaskRunners* task_runners, |
| 2345 const fileapi::FileSystemOptions& options, |
| 2341 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { | 2346 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { |
| 2342 #if !defined(OS_ANDROID) | 2347 #if !defined(OS_ANDROID) |
| 2343 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 2348 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 2344 additional_backends->push_back(new MediaFileSystemBackend( | 2349 additional_backends->push_back(new MediaFileSystemBackend( |
| 2345 storage_partition_path, | 2350 storage_partition_path, |
| 2346 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( | 2351 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( |
| 2347 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); | 2352 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); |
| 2348 #endif | 2353 #endif |
| 2349 #if defined(OS_CHROMEOS) | 2354 #if defined(OS_CHROMEOS) |
| 2350 fileapi::ExternalMountPoints* external_mount_points = | 2355 fileapi::ExternalMountPoints* external_mount_points = |
| 2351 content::BrowserContext::GetMountPoints(browser_context); | 2356 content::BrowserContext::GetMountPoints(browser_context); |
| 2352 DCHECK(external_mount_points); | 2357 DCHECK(external_mount_points); |
| 2353 chromeos::FileSystemBackend* backend = | 2358 chromeos::FileSystemBackend* backend = |
| 2354 new chromeos::FileSystemBackend( | 2359 new chromeos::FileSystemBackend( |
| 2355 new drive::FileSystemBackendDelegate(browser_context), | 2360 new drive::FileSystemBackendDelegate(browser_context), |
| 2356 browser_context->GetSpecialStoragePolicy(), | 2361 browser_context->GetSpecialStoragePolicy(), |
| 2357 external_mount_points, | 2362 external_mount_points, |
| 2358 fileapi::ExternalMountPoints::GetSystemInstance()); | 2363 fileapi::ExternalMountPoints::GetSystemInstance()); |
| 2359 backend->AddSystemMountPoints(); | 2364 backend->AddSystemMountPoints(); |
| 2360 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); | 2365 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); |
| 2361 additional_backends->push_back(backend); | 2366 additional_backends->push_back(backend); |
| 2362 #endif | 2367 #endif |
| 2368 |
| 2369 additional_backends->push_back( |
| 2370 new sync_file_system::SyncFileSystemBackend( |
| 2371 task_runners->file_task_runner(), options)); |
| 2363 } | 2372 } |
| 2364 | 2373 |
| 2365 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2374 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 2366 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2375 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 2367 const CommandLine& command_line, | 2376 const CommandLine& command_line, |
| 2368 int child_process_id, | 2377 int child_process_id, |
| 2369 std::vector<FileDescriptorInfo>* mappings) { | 2378 std::vector<FileDescriptorInfo>* mappings) { |
| 2370 #if defined(OS_ANDROID) | 2379 #if defined(OS_ANDROID) |
| 2371 base::FilePath data_path; | 2380 base::FilePath data_path; |
| 2372 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); | 2381 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 #if defined(USE_NSS) | 2469 #if defined(USE_NSS) |
| 2461 crypto::CryptoModuleBlockingPasswordDelegate* | 2470 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2462 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2471 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2463 const GURL& url) { | 2472 const GURL& url) { |
| 2464 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2473 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2465 chrome::kCryptoModulePasswordKeygen, url.host()); | 2474 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2466 } | 2475 } |
| 2467 #endif | 2476 #endif |
| 2468 | 2477 |
| 2469 } // namespace chrome | 2478 } // namespace chrome |
| OLD | NEW |