| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 extension_service_->GetExtensionById(extension_id_prompting_, true); | 665 extension_service_->GetExtensionById(extension_id_prompting_, true); |
| 666 if (!extension) { | 666 if (!extension) { |
| 667 extension = | 667 extension = |
| 668 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( | 668 ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->GetExtensionById( |
| 669 extension_id_prompting_, ExtensionRegistry::TERMINATED); | 669 extension_id_prompting_, ExtensionRegistry::TERMINATED); |
| 670 was_terminated = true; | 670 was_terminated = true; |
| 671 } | 671 } |
| 672 if (!extension) | 672 if (!extension) |
| 673 return; | 673 return; |
| 674 | 674 |
| 675 extension_service_->UninstallExtension(extension_id_prompting_, | 675 extension_service_->UninstallExtension( |
| 676 false, // External uninstall. | 676 extension_id_prompting_, |
| 677 NULL); // Error. | 677 ExtensionService::kUninstallReasonUserInitiated, |
| 678 NULL); // Error. |
| 678 extension_id_prompting_ = ""; | 679 extension_id_prompting_ = ""; |
| 679 | 680 |
| 680 // There will be no EXTENSION_UNLOADED notification for terminated | 681 // There will be no EXTENSION_UNLOADED notification for terminated |
| 681 // extensions as they were already unloaded. | 682 // extensions as they were already unloaded. |
| 682 if (was_terminated) | 683 if (was_terminated) |
| 683 HandleRequestExtensionsData(NULL); | 684 HandleRequestExtensionsData(NULL); |
| 684 } | 685 } |
| 685 | 686 |
| 686 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { | 687 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { |
| 687 extension_id_prompting_ = ""; | 688 extension_id_prompting_ = ""; |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 extension_service_->EnableExtension(extension_id); | 1285 extension_service_->EnableExtension(extension_id); |
| 1285 } else { | 1286 } else { |
| 1286 ExtensionErrorReporter::GetInstance()->ReportError( | 1287 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1287 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1288 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1288 true); // Be noisy. | 1289 true); // Be noisy. |
| 1289 } | 1290 } |
| 1290 requirements_checker_.reset(); | 1291 requirements_checker_.reset(); |
| 1291 } | 1292 } |
| 1292 | 1293 |
| 1293 } // namespace extensions | 1294 } // namespace extensions |
| OLD | NEW |