| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 &ExtensionWebUI::HandleChromeURLOverrideReverse); | 530 &ExtensionWebUI::HandleChromeURLOverrideReverse); |
| 531 } | 531 } |
| 532 | 532 |
| 533 void ChromeContentBrowserClientExtensionsPart:: | 533 void ChromeContentBrowserClientExtensionsPart:: |
| 534 GetAdditionalAllowedSchemesForFileSystem( | 534 GetAdditionalAllowedSchemesForFileSystem( |
| 535 std::vector<std::string>* additional_allowed_schemes) { | 535 std::vector<std::string>* additional_allowed_schemes) { |
| 536 additional_allowed_schemes->push_back(kExtensionScheme); | 536 additional_allowed_schemes->push_back(kExtensionScheme); |
| 537 } | 537 } |
| 538 | 538 |
| 539 void ChromeContentBrowserClientExtensionsPart::GetURLRequestAutoMountHandlers( | 539 void ChromeContentBrowserClientExtensionsPart::GetURLRequestAutoMountHandlers( |
| 540 std::vector<fileapi::URLRequestAutoMountHandler>* handlers) { | 540 std::vector<storage::URLRequestAutoMountHandler>* handlers) { |
| 541 handlers->push_back( | 541 handlers->push_back( |
| 542 base::Bind(MediaFileSystemBackend::AttemptAutoMountForURLRequest)); | 542 base::Bind(MediaFileSystemBackend::AttemptAutoMountForURLRequest)); |
| 543 } | 543 } |
| 544 | 544 |
| 545 void ChromeContentBrowserClientExtensionsPart::GetAdditionalFileSystemBackends( | 545 void ChromeContentBrowserClientExtensionsPart::GetAdditionalFileSystemBackends( |
| 546 content::BrowserContext* browser_context, | 546 content::BrowserContext* browser_context, |
| 547 const base::FilePath& storage_partition_path, | 547 const base::FilePath& storage_partition_path, |
| 548 ScopedVector<fileapi::FileSystemBackend>* additional_backends) { | 548 ScopedVector<storage::FileSystemBackend>* additional_backends) { |
| 549 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 549 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 550 additional_backends->push_back(new MediaFileSystemBackend( | 550 additional_backends->push_back(new MediaFileSystemBackend( |
| 551 storage_partition_path, | 551 storage_partition_path, |
| 552 pool->GetSequencedTaskRunner( | 552 pool->GetSequencedTaskRunner( |
| 553 pool->GetNamedSequenceToken( | 553 pool->GetNamedSequenceToken( |
| 554 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); | 554 MediaFileSystemBackend::kMediaTaskRunnerName)).get())); |
| 555 | 555 |
| 556 additional_backends->push_back(new sync_file_system::SyncFileSystemBackend( | 556 additional_backends->push_back(new sync_file_system::SyncFileSystemBackend( |
| 557 Profile::FromBrowserContext(browser_context))); | 557 Profile::FromBrowserContext(browser_context))); |
| 558 } | 558 } |
| 559 | 559 |
| 560 void ChromeContentBrowserClientExtensionsPart:: | 560 void ChromeContentBrowserClientExtensionsPart:: |
| 561 AppendExtraRendererCommandLineSwitches(base::CommandLine* command_line, | 561 AppendExtraRendererCommandLineSwitches(base::CommandLine* command_line, |
| 562 content::RenderProcessHost* process, | 562 content::RenderProcessHost* process, |
| 563 Profile* profile) { | 563 Profile* profile) { |
| 564 if (!process) | 564 if (!process) |
| 565 return; | 565 return; |
| 566 DCHECK(profile); | 566 DCHECK(profile); |
| 567 if (ProcessMap::Get(profile)->Contains(process->GetID())) | 567 if (ProcessMap::Get(profile)->Contains(process->GetID())) |
| 568 command_line->AppendSwitch(switches::kExtensionProcess); | 568 command_line->AppendSwitch(switches::kExtensionProcess); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace extensions | 571 } // namespace extensions |
| OLD | NEW |