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

Unified Diff: chrome/browser/extensions/bundle_installer.h

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/bundle_installer.h
diff --git a/chrome/browser/extensions/bundle_installer.h b/chrome/browser/extensions/bundle_installer.h
index 8945f82d2fdc41090e37cf757ce6c3b2e80b6d6f..cd8fe90609ff4d5ad79e6379693e7aed88854fd2 100644
--- a/chrome/browser/extensions/bundle_installer.h
+++ b/chrome/browser/extensions/bundle_installer.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/webstore_install_helper.h"
@@ -44,7 +45,6 @@ namespace extensions {
// 2) CompleteInstall: install the CRXs and show confirmation bubble
//
class BundleInstaller : public WebstoreInstallHelper::Delegate,
- public ExtensionInstallPrompt::Delegate,
public WebstoreInstaller::Delegate,
public chrome::BrowserListObserver {
public:
@@ -158,10 +158,6 @@ class BundleInstaller : public WebstoreInstallHelper::Delegate,
InstallHelperResultCode result_code,
const std::string& error_message) override;
- // ExtensionInstallPrompt::Delegate implementation:
- void InstallUIProceed() override;
- void InstallUIAbort(bool user_initiated) override;
-
// WebstoreInstaller::Delegate implementation:
void OnExtensionInstallSuccess(const std::string& id) override;
void OnExtensionInstallFailure(
@@ -172,6 +168,8 @@ class BundleInstaller : public WebstoreInstallHelper::Delegate,
// chrome::BrowserListObserver implementation:
void OnBrowserRemoved(Browser* browser) override;
+ void OnInstallPromptDone(ExtensionInstallPrompt::Result result);
+
// Holds the Extensions used to generate the permission warnings.
ExtensionList dummy_extensions_;
@@ -213,6 +211,8 @@ class BundleInstaller : public WebstoreInstallHelper::Delegate,
ApprovalCallback approval_callback_;
base::Closure install_callback_;
+ base::WeakPtrFactory<BundleInstaller> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BundleInstaller);
};
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ('k') | chrome/browser/extensions/bundle_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698