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_options.h" |
| 141 #include "webkit/browser/fileapi/file_system_task_runners.h" |
| 142 #include "webkit/browser/fileapi/syncable/sync_file_system_backend.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 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 std::vector<std::string>* additional_allowed_schemes) { | 2335 std::vector<std::string>* additional_allowed_schemes) { |
2333 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2336 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
2334 additional_allowed_schemes); | 2337 additional_allowed_schemes); |
2335 additional_allowed_schemes->push_back(kChromeUIScheme); | 2338 additional_allowed_schemes->push_back(kChromeUIScheme); |
2336 additional_allowed_schemes->push_back(extensions::kExtensionScheme); | 2339 additional_allowed_schemes->push_back(extensions::kExtensionScheme); |
2337 } | 2340 } |
2338 | 2341 |
2339 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( | 2342 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( |
2340 content::BrowserContext* browser_context, | 2343 content::BrowserContext* browser_context, |
2341 const base::FilePath& storage_partition_path, | 2344 const base::FilePath& storage_partition_path, |
| 2345 fileapi::FileSystemTaskRunners* task_runners, |
| 2346 const fileapi::FileSystemOptions& options, |
2342 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { | 2347 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { |
2343 #if !defined(OS_ANDROID) | 2348 #if !defined(OS_ANDROID) |
2344 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 2349 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
2345 additional_backends->push_back(new MediaFileSystemBackend( | 2350 additional_backends->push_back(new MediaFileSystemBackend( |
2346 storage_partition_path, | 2351 storage_partition_path, |
2347 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( | 2352 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken( |
2348 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); | 2353 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); |
2349 #endif | 2354 #endif |
2350 #if defined(OS_CHROMEOS) | 2355 #if defined(OS_CHROMEOS) |
2351 fileapi::ExternalMountPoints* external_mount_points = | 2356 fileapi::ExternalMountPoints* external_mount_points = |
2352 content::BrowserContext::GetMountPoints(browser_context); | 2357 content::BrowserContext::GetMountPoints(browser_context); |
2353 DCHECK(external_mount_points); | 2358 DCHECK(external_mount_points); |
2354 chromeos::FileSystemBackend* backend = | 2359 chromeos::FileSystemBackend* backend = |
2355 new chromeos::FileSystemBackend( | 2360 new chromeos::FileSystemBackend( |
2356 new drive::FileSystemBackendDelegate(browser_context), | 2361 new drive::FileSystemBackendDelegate(browser_context), |
2357 browser_context->GetSpecialStoragePolicy(), | 2362 browser_context->GetSpecialStoragePolicy(), |
2358 external_mount_points, | 2363 external_mount_points, |
2359 fileapi::ExternalMountPoints::GetSystemInstance()); | 2364 fileapi::ExternalMountPoints::GetSystemInstance()); |
2360 backend->AddSystemMountPoints(); | 2365 backend->AddSystemMountPoints(); |
2361 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); | 2366 DCHECK(backend->CanHandleType(fileapi::kFileSystemTypeExternal)); |
2362 additional_backends->push_back(backend); | 2367 additional_backends->push_back(backend); |
2363 #endif | 2368 #endif |
| 2369 |
| 2370 additional_backends->push_back( |
| 2371 new sync_file_system::SyncFileSystemBackend( |
| 2372 task_runners->file_task_runner(), options)); |
2364 } | 2373 } |
2365 | 2374 |
2366 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2375 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
2367 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2376 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2368 const CommandLine& command_line, | 2377 const CommandLine& command_line, |
2369 int child_process_id, | 2378 int child_process_id, |
2370 std::vector<FileDescriptorInfo>* mappings) { | 2379 std::vector<FileDescriptorInfo>* mappings) { |
2371 #if defined(OS_ANDROID) | 2380 #if defined(OS_ANDROID) |
2372 base::FilePath data_path; | 2381 base::FilePath data_path; |
2373 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); | 2382 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2461 #if defined(USE_NSS) | 2470 #if defined(USE_NSS) |
2462 crypto::CryptoModuleBlockingPasswordDelegate* | 2471 crypto::CryptoModuleBlockingPasswordDelegate* |
2463 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2472 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2464 const GURL& url) { | 2473 const GURL& url) { |
2465 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2474 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2466 chrome::kCryptoModulePasswordKeygen, url.host()); | 2475 chrome::kCryptoModulePasswordKeygen, url.host()); |
2467 } | 2476 } |
2468 #endif | 2477 #endif |
2469 | 2478 |
2470 } // namespace chrome | 2479 } // namespace chrome |
OLD | NEW |