| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/chrome_content_browser_client_extensions_par
t.h" | 5 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 &ExtensionWebUI::HandleChromeURLOverrideReverse); | 492 &ExtensionWebUI::HandleChromeURLOverrideReverse); |
| 493 } | 493 } |
| 494 | 494 |
| 495 void ChromeContentBrowserClientExtensionsPart:: | 495 void ChromeContentBrowserClientExtensionsPart:: |
| 496 GetAdditionalAllowedSchemesForFileSystem( | 496 GetAdditionalAllowedSchemesForFileSystem( |
| 497 std::vector<std::string>* additional_allowed_schemes) { | 497 std::vector<std::string>* additional_allowed_schemes) { |
| 498 additional_allowed_schemes->push_back(kExtensionScheme); | 498 additional_allowed_schemes->push_back(kExtensionScheme); |
| 499 } | 499 } |
| 500 | 500 |
| 501 void ChromeContentBrowserClientExtensionsPart::GetURLRequestAutoMountHandlers( | 501 void ChromeContentBrowserClientExtensionsPart::GetURLRequestAutoMountHandlers( |
| 502 std::vector<fileapi::URLRequestAutoMountHandler>* handlers) { | 502 std::vector<storage::URLRequestAutoMountHandler>* handlers) { |
| 503 handlers->push_back( | 503 handlers->push_back( |
| 504 base::Bind(MediaFileSystemBackend::AttemptAutoMountForURLRequest)); | 504 base::Bind(MediaFileSystemBackend::AttemptAutoMountForURLRequest)); |
| 505 } | 505 } |
| 506 | 506 |
| 507 void ChromeContentBrowserClientExtensionsPart::GetAdditionalFileSystemBackends( | 507 void ChromeContentBrowserClientExtensionsPart::GetAdditionalFileSystemBackends( |
| 508 content::BrowserContext* browser_context, | 508 content::BrowserContext* browser_context, |
| 509 const base::FilePath& storage_partition_path, | 509 const base::FilePath& storage_partition_path, |
| 510 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { | 510 ScopedVector<storage::FileSystemBackend>* additional_backends) { |
| 511 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 511 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 512 additional_backends->push_back(new MediaFileSystemBackend( | 512 additional_backends->push_back(new MediaFileSystemBackend( |
| 513 storage_partition_path, | 513 storage_partition_path, |
| 514 pool->GetSequencedTaskRunner( | 514 pool->GetSequencedTaskRunner( |
| 515 pool->GetNamedSequenceToken( | 515 pool->GetNamedSequenceToken( |
| 516 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); | 516 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); |
| 517 | 517 |
| 518 additional_backends->push_back(new sync_file_system::SyncFileSystemBackend( | 518 additional_backends->push_back(new sync_file_system::SyncFileSystemBackend( |
| 519 Profile::FromBrowserContext(browser_context))); | 519 Profile::FromBrowserContext(browser_context))); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void ChromeContentBrowserClientExtensionsPart:: | 522 void ChromeContentBrowserClientExtensionsPart:: |
| 523 AppendExtraRendererCommandLineSwitches(base::CommandLine* command_line, | 523 AppendExtraRendererCommandLineSwitches(base::CommandLine* command_line, |
| 524 content::RenderProcessHost* process, | 524 content::RenderProcessHost* process, |
| 525 Profile* profile) { | 525 Profile* profile) { |
| 526 if (!process) | 526 if (!process) |
| 527 return; | 527 return; |
| 528 DCHECK(profile); | 528 DCHECK(profile); |
| 529 if (ProcessMap::Get(profile)->Contains(process->GetID())) | 529 if (ProcessMap::Get(profile)->Contains(process->GetID())) |
| 530 command_line->AppendSwitch(switches::kExtensionProcess); | 530 command_line->AppendSwitch(switches::kExtensionProcess); |
| 531 } | 531 } |
| 532 | 532 |
| 533 } // namespace extensions | 533 } // namespace extensions |
| OLD | NEW |