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

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_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: Created 6 years, 7 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/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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 // Do the uninstall work here. 801 // Do the uninstall work here.
802 DCHECK(!extension_id_prompting_.empty()); 802 DCHECK(!extension_id_prompting_.empty());
803 803
804 // The extension can be uninstalled in another window while the UI was 804 // The extension can be uninstalled in another window while the UI was
805 // showing. Do nothing in that case. 805 // showing. Do nothing in that case.
806 const Extension* extension = 806 const Extension* extension =
807 extension_service_->GetInstalledExtension(extension_id_prompting_); 807 extension_service_->GetInstalledExtension(extension_id_prompting_);
808 if (!extension) 808 if (!extension)
809 return; 809 return;
810 810
811 extension_service_->UninstallExtension(extension_id_prompting_, 811 extension_service_->UninstallExtension(
812 false /* external_uninstall */, NULL); 812 extension_id_prompting_,
813 ExtensionService::kUninstallReasonUserInitiated,
814 NULL);
813 CleanupAfterUninstall(); 815 CleanupAfterUninstall();
814 } 816 }
815 817
816 void AppLauncherHandler::ExtensionUninstallCanceled() { 818 void AppLauncherHandler::ExtensionUninstallCanceled() {
817 CleanupAfterUninstall(); 819 CleanupAfterUninstall();
818 } 820 }
819 821
820 void AppLauncherHandler::ExtensionEnableFlowFinished() { 822 void AppLauncherHandler::ExtensionEnableFlowFinished() {
821 DCHECK_EQ(extension_id_prompting_, extension_enable_flow_->extension_id()); 823 DCHECK_EQ(extension_id_prompting_, extension_enable_flow_->extension_id());
822 824
(...skipping 28 matching lines...) Expand all
851 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() { 853 ExtensionUninstallDialog* AppLauncherHandler::GetExtensionUninstallDialog() {
852 if (!extension_uninstall_dialog_.get()) { 854 if (!extension_uninstall_dialog_.get()) {
853 Browser* browser = chrome::FindBrowserWithWebContents( 855 Browser* browser = chrome::FindBrowserWithWebContents(
854 web_ui()->GetWebContents()); 856 web_ui()->GetWebContents());
855 extension_uninstall_dialog_.reset( 857 extension_uninstall_dialog_.reset(
856 ExtensionUninstallDialog::Create(extension_service_->profile(), 858 ExtensionUninstallDialog::Create(extension_service_->profile(),
857 browser, this)); 859 browser, this));
858 } 860 }
859 return extension_uninstall_dialog_.get(); 861 return extension_uninstall_dialog_.get();
860 } 862 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698