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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
6 | 6 |
7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
9 #include "apps/app_window.h" | 9 #include "apps/app_window.h" |
10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 extension = | 728 extension = |
729 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( | 729 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( |
730 extension_id_prompting_, ExtensionRegistry::TERMINATED); | 730 extension_id_prompting_, ExtensionRegistry::TERMINATED); |
731 was_terminated = true; | 731 was_terminated = true; |
732 } | 732 } |
733 if (!extension) | 733 if (!extension) |
734 return; | 734 return; |
735 | 735 |
736 extension_service_->UninstallExtension( | 736 extension_service_->UninstallExtension( |
737 extension_id_prompting_, | 737 extension_id_prompting_, |
738 ExtensionService::UNINSTALL_REASON_USER_INITIATED, | 738 UninstalledExtensionInfo::REASON_USER_INITIATED, |
739 NULL); // Error. | 739 NULL); // Error. |
740 extension_id_prompting_ = ""; | 740 extension_id_prompting_ = ""; |
741 | 741 |
742 // There will be no EXTENSION_UNLOADED notification for terminated | 742 // There will be no EXTENSION_UNLOADED notification for terminated |
743 // extensions as they were already unloaded. | 743 // extensions as they were already unloaded. |
744 if (was_terminated) | 744 if (was_terminated) |
745 HandleRequestExtensionsData(NULL); | 745 HandleRequestExtensionsData(NULL); |
746 } | 746 } |
747 | 747 |
748 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { | 748 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 extension_service_->EnableExtension(extension_id); | 1366 extension_service_->EnableExtension(extension_id); |
1367 } else { | 1367 } else { |
1368 ExtensionErrorReporter::GetInstance()->ReportError( | 1368 ExtensionErrorReporter::GetInstance()->ReportError( |
1369 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1369 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1370 true); // Be noisy. | 1370 true); // Be noisy. |
1371 } | 1371 } |
1372 requirements_checker_.reset(); | 1372 requirements_checker_.reset(); |
1373 } | 1373 } |
1374 | 1374 |
1375 } // namespace extensions | 1375 } // namespace extensions |
OLD | NEW |