OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 if (extension && extension->was_installed_by_oem()) | 618 if (extension && extension->was_installed_by_oem()) |
619 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; | 619 creation_flags |= Extension::WAS_INSTALLED_BY_OEM; |
620 | 620 |
621 if (extension && extension->is_ephemeral()) | 621 if (extension && extension->is_ephemeral()) |
622 creation_flags |= Extension::IS_EPHEMERAL; | 622 creation_flags |= Extension::IS_EPHEMERAL; |
623 | 623 |
624 installer->set_creation_flags(creation_flags); | 624 installer->set_creation_flags(creation_flags); |
625 | 625 |
626 installer->set_delete_source(file_ownership_passed); | 626 installer->set_delete_source(file_ownership_passed); |
627 installer->set_download_url(download_url); | |
628 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); | 627 installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); |
629 installer->InstallCrx(extension_path); | 628 installer->InstallCrx(extension_path); |
630 | 629 |
631 if (out_crx_installer) | 630 if (out_crx_installer) |
632 *out_crx_installer = installer.get(); | 631 *out_crx_installer = installer.get(); |
633 | 632 |
634 return true; | 633 return true; |
635 } | 634 } |
636 | 635 |
637 void ExtensionService::ReloadExtension(const std::string extension_id) { | 636 void ExtensionService::ReloadExtension(const std::string extension_id) { |
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 void ExtensionService::UnloadAllExtensionsInternal() { | 2655 void ExtensionService::UnloadAllExtensionsInternal() { |
2657 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); | 2656 profile_->GetExtensionSpecialStoragePolicy()->RevokeRightsForAllExtensions(); |
2658 | 2657 |
2659 registry_->ClearAll(); | 2658 registry_->ClearAll(); |
2660 system_->runtime_data()->ClearAll(); | 2659 system_->runtime_data()->ClearAll(); |
2661 | 2660 |
2662 // TODO(erikkay) should there be a notification for this? We can't use | 2661 // TODO(erikkay) should there be a notification for this? We can't use |
2663 // EXTENSION_UNLOADED since that implies that the extension has been disabled | 2662 // EXTENSION_UNLOADED since that implies that the extension has been disabled |
2664 // or uninstalled. | 2663 // or uninstalled. |
2665 } | 2664 } |
OLD | NEW |