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

Unified Diff: chrome/browser/extensions/webstore_reinstaller.cc

Issue 1534123002: [Extensions] Migrate ExtensionInstallPrompt::Delegate to be a callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/webstore_reinstaller.cc
diff --git a/chrome/browser/extensions/webstore_reinstaller.cc b/chrome/browser/extensions/webstore_reinstaller.cc
index 1eb1e3bbbfecfb1da60a864be169b0e5db9ae1d1..d1a16041b1975978b385256b4688e1457efaddcd 100644
--- a/chrome/browser/extensions/webstore_reinstaller.cc
+++ b/chrome/browser/extensions/webstore_reinstaller.cc
@@ -86,7 +86,13 @@ void WebstoreReinstaller::WebContentsDestroyed() {
AbortInstall();
}
-void WebstoreReinstaller::InstallUIProceed() {
+void WebstoreReinstaller::OnInstallPromptDone(
+ ExtensionInstallPrompt::Result result) {
+ if (result != ExtensionInstallPrompt::Result::ACCEPTED) {
+ WebstoreStandaloneInstaller::OnInstallPromptDone(result);
+ return;
+ }
+
if (!ExtensionSystem::Get(profile())->extension_service()->UninstallExtension(
id(),
UNINSTALL_REASON_REINSTALL,
@@ -100,7 +106,8 @@ void WebstoreReinstaller::InstallUIProceed() {
}
void WebstoreReinstaller::OnDeletionDone() {
- WebstoreStandaloneInstaller::InstallUIProceed();
+ WebstoreStandaloneInstaller::OnInstallPromptDone(
+ ExtensionInstallPrompt::Result::ACCEPTED);
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/webstore_reinstaller.h ('k') | chrome/browser/extensions/webstore_standalone_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698