| 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_service_->GetExtensionById(extension_id_prompting_, true); | 728 extension_service_->GetExtensionById(extension_id_prompting_, true); |
| 729 if (!extension) { | 729 if (!extension) { |
| 730 extension = | 730 extension = |
| 731 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( | 731 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( |
| 732 extension_id_prompting_, ExtensionRegistry::TERMINATED); | 732 extension_id_prompting_, ExtensionRegistry::TERMINATED); |
| 733 was_terminated = true; | 733 was_terminated = true; |
| 734 } | 734 } |
| 735 if (!extension) | 735 if (!extension) |
| 736 return; | 736 return; |
| 737 | 737 |
| 738 extension_service_->UninstallExtension( | 738 extension_service_->UninstallExtension(extension_id_prompting_, |
| 739 extension_id_prompting_, | 739 false, // External uninstall. |
| 740 ExtensionService::UNINSTALL_REASON_USER_INITIATED, | 740 NULL); // Error. |
| 741 NULL); // Error. | |
| 742 extension_id_prompting_ = ""; | 741 extension_id_prompting_ = ""; |
| 743 | 742 |
| 744 // There will be no EXTENSION_UNLOADED notification for terminated | 743 // There will be no EXTENSION_UNLOADED notification for terminated |
| 745 // extensions as they were already unloaded. | 744 // extensions as they were already unloaded. |
| 746 if (was_terminated) | 745 if (was_terminated) |
| 747 HandleRequestExtensionsData(NULL); | 746 HandleRequestExtensionsData(NULL); |
| 748 } | 747 } |
| 749 | 748 |
| 750 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { | 749 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { |
| 751 extension_id_prompting_ = ""; | 750 extension_id_prompting_ = ""; |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 extension_service_->EnableExtension(extension_id); | 1367 extension_service_->EnableExtension(extension_id); |
| 1369 } else { | 1368 } else { |
| 1370 ExtensionErrorReporter::GetInstance()->ReportError( | 1369 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1371 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1370 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1372 true); // Be noisy. | 1371 true); // Be noisy. |
| 1373 } | 1372 } |
| 1374 requirements_checker_.reset(); | 1373 requirements_checker_.reset(); |
| 1375 } | 1374 } |
| 1376 | 1375 |
| 1377 } // namespace extensions | 1376 } // namespace extensions |
| OLD | NEW |