Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issue exposed by failing unit test. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698