| 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/extensions/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 #if defined(ENABLE_PLUGINS) | 587 #if defined(ENABLE_PLUGINS) |
| 588 base::FilePath pdf_path; | 588 base::FilePath pdf_path; |
| 589 content::PluginService* plugin_service = | 589 content::PluginService* plugin_service = |
| 590 content::PluginService::GetInstance(); | 590 content::PluginService::GetInstance(); |
| 591 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOutOfProcessPdf) && | 591 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOutOfProcessPdf) && |
| 592 PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path) && | 592 PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path) && |
| 593 plugin_service->GetRegisteredPpapiPluginInfo(pdf_path)) { | 593 plugin_service->GetRegisteredPpapiPluginInfo(pdf_path)) { |
| 594 Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf"))); | 594 Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf"))); |
| 595 } | 595 } |
| 596 #endif | 596 #endif |
| 597 |
| 598 Add(IDR_CRYPTOTOKEN_MANIFEST, |
| 599 base::FilePath(FILE_PATH_LITERAL("cryptotoken"))); |
| 597 } | 600 } |
| 598 | 601 |
| 599 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { | 602 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |
| 600 delete component->manifest; | 603 delete component->manifest; |
| 601 if (extension_service_->is_ready()) { | 604 if (extension_service_->is_ready()) { |
| 602 extension_service_-> | 605 extension_service_-> |
| 603 RemoveComponentExtension(component->extension_id); | 606 RemoveComponentExtension(component->extension_id); |
| 604 } | 607 } |
| 605 } | 608 } |
| 606 | 609 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 619 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 622 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
| 620 fileapi::FileSystemContext* file_system_context = | 623 fileapi::FileSystemContext* file_system_context = |
| 621 content::BrowserContext::GetStoragePartitionForSite( | 624 content::BrowserContext::GetStoragePartitionForSite( |
| 622 off_the_record_context, site)->GetFileSystemContext(); | 625 off_the_record_context, site)->GetFileSystemContext(); |
| 623 file_system_context->EnableTemporaryFileSystemInIncognito(); | 626 file_system_context->EnableTemporaryFileSystemInIncognito(); |
| 624 } | 627 } |
| 625 #endif | 628 #endif |
| 626 } | 629 } |
| 627 | 630 |
| 628 } // namespace extensions | 631 } // namespace extensions |
| OLD | NEW |