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/ntp/app_launcher_handler.h" | 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "apps/metrics_names.h" | 9 #include "apps/metrics_names.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 // The extension can be uninstalled in another window while the UI was | 786 // The extension can be uninstalled in another window while the UI was |
787 // showing. Do nothing in that case. | 787 // showing. Do nothing in that case. |
788 const Extension* extension = | 788 const Extension* extension = |
789 extension_service_->GetInstalledExtension(extension_id_prompting_); | 789 extension_service_->GetInstalledExtension(extension_id_prompting_); |
790 if (!extension) | 790 if (!extension) |
791 return; | 791 return; |
792 | 792 |
793 extension_service_->UninstallExtension( | 793 extension_service_->UninstallExtension( |
794 extension_id_prompting_, | 794 extension_id_prompting_, |
795 extensions::UNINSTALL_REASON_USER_INITIATED, | 795 extensions::UNINSTALL_REASON_USER_INITIATED, |
| 796 base::Bind(&base::DoNothing), |
796 NULL); | 797 NULL); |
797 CleanupAfterUninstall(); | 798 CleanupAfterUninstall(); |
798 } | 799 } |
799 | 800 |
800 void AppLauncherHandler::ExtensionUninstallCanceled() { | 801 void AppLauncherHandler::ExtensionUninstallCanceled() { |
801 CleanupAfterUninstall(); | 802 CleanupAfterUninstall(); |
802 } | 803 } |
803 | 804 |
804 void AppLauncherHandler::ExtensionEnableFlowFinished() { | 805 void AppLauncherHandler::ExtensionEnableFlowFinished() { |
805 DCHECK_EQ(extension_id_prompting_, extension_enable_flow_->extension_id()); | 806 DCHECK_EQ(extension_id_prompting_, extension_enable_flow_->extension_id()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 Browser* browser = chrome::FindBrowserWithWebContents( | 839 Browser* browser = chrome::FindBrowserWithWebContents( |
839 web_ui()->GetWebContents()); | 840 web_ui()->GetWebContents()); |
840 extension_uninstall_dialog_.reset( | 841 extension_uninstall_dialog_.reset( |
841 extensions::ExtensionUninstallDialog::Create( | 842 extensions::ExtensionUninstallDialog::Create( |
842 extension_service_->profile(), | 843 extension_service_->profile(), |
843 browser->window()->GetNativeWindow(), | 844 browser->window()->GetNativeWindow(), |
844 this)); | 845 this)); |
845 } | 846 } |
846 return extension_uninstall_dialog_.get(); | 847 return extension_uninstall_dialog_.get(); |
847 } | 848 } |
OLD | NEW |