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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 if (!GetFileTaskRunner()->PostTask( | 753 if (!GetFileTaskRunner()->PostTask( |
754 FROM_HERE, | 754 FROM_HERE, |
755 base::Bind(&ExtensionService::UninstallExtensionOnFileThread, | 755 base::Bind(&ExtensionService::UninstallExtensionOnFileThread, |
756 extension->id(), | 756 extension->id(), |
757 profile_, | 757 profile_, |
758 install_directory_, | 758 install_directory_, |
759 extension->path()))) | 759 extension->path()))) |
760 NOTREACHED(); | 760 NOTREACHED(); |
761 } | 761 } |
762 | 762 |
763 // Do not remove the data of ephemeral apps. They will be garbage collected by | 763 extensions::DataDeleter::StartDeleting(profile_, extension.get()); |
764 // EphemeralAppService. | |
765 if (!extension_prefs_->IsEphemeralApp(extension->id())) | |
766 extensions::DataDeleter::StartDeleting(profile_, extension.get()); | |
767 | 764 |
768 UntrackTerminatedExtension(extension->id()); | 765 UntrackTerminatedExtension(extension->id()); |
769 | 766 |
770 // Notify interested parties that we've uninstalled this extension. | 767 // Notify interested parties that we've uninstalled this extension. |
771 content::NotificationService::current()->Notify( | 768 content::NotificationService::current()->Notify( |
772 chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED, | 769 chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED, |
773 content::Source<Profile>(profile_), | 770 content::Source<Profile>(profile_), |
774 content::Details<const Extension>(extension.get())); | 771 content::Details<const Extension>(extension.get())); |
775 ExtensionRegistry::Get(profile_)->TriggerOnUninstalled(extension.get()); | 772 ExtensionRegistry::Get(profile_)->TriggerOnUninstalled(extension.get()); |
776 | 773 |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 } | 2537 } |
2541 | 2538 |
2542 void ExtensionService::OnProfileDestructionStarted() { | 2539 void ExtensionService::OnProfileDestructionStarted() { |
2543 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2540 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
2544 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2541 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
2545 it != ids_to_unload.end(); | 2542 it != ids_to_unload.end(); |
2546 ++it) { | 2543 ++it) { |
2547 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2544 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
2548 } | 2545 } |
2549 } | 2546 } |
OLD | NEW |