| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 extension_service_->GetExtensionById(extension_id_prompting_, true); | 719 extension_service_->GetExtensionById(extension_id_prompting_, true); |
| 720 if (!extension) { | 720 if (!extension) { |
| 721 extension = | 721 extension = |
| 722 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( | 722 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( |
| 723 extension_id_prompting_, ExtensionRegistry::TERMINATED); | 723 extension_id_prompting_, ExtensionRegistry::TERMINATED); |
| 724 was_terminated = true; | 724 was_terminated = true; |
| 725 } | 725 } |
| 726 if (!extension) | 726 if (!extension) |
| 727 return; | 727 return; |
| 728 | 728 |
| 729 extension_service_->UninstallExtension(extension_id_prompting_, | 729 extension_service_->UninstallExtension( |
| 730 false, // External uninstall. | 730 extension_id_prompting_, |
| 731 NULL); // Error. | 731 ExtensionService::UNINSTALL_REASON_USER_INITIATED, |
| 732 NULL); // Error. |
| 732 extension_id_prompting_ = ""; | 733 extension_id_prompting_ = ""; |
| 733 | 734 |
| 734 // There will be no EXTENSION_UNLOADED notification for terminated | 735 // There will be no EXTENSION_UNLOADED notification for terminated |
| 735 // extensions as they were already unloaded. | 736 // extensions as they were already unloaded. |
| 736 if (was_terminated) | 737 if (was_terminated) |
| 737 HandleRequestExtensionsData(NULL); | 738 HandleRequestExtensionsData(NULL); |
| 738 } | 739 } |
| 739 | 740 |
| 740 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { | 741 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { |
| 741 extension_id_prompting_ = ""; | 742 extension_id_prompting_ = ""; |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 extension_service_->EnableExtension(extension_id); | 1346 extension_service_->EnableExtension(extension_id); |
| 1346 } else { | 1347 } else { |
| 1347 ExtensionErrorReporter::GetInstance()->ReportError( | 1348 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1348 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1349 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1349 true); // Be noisy. | 1350 true); // Be noisy. |
| 1350 } | 1351 } |
| 1351 requirements_checker_.reset(); | 1352 requirements_checker_.reset(); |
| 1352 } | 1353 } |
| 1353 | 1354 |
| 1354 } // namespace extensions | 1355 } // namespace extensions |
| OLD | NEW |