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

Unified Diff: chrome/browser/extensions/api/management/management_api.h

Issue 12089037: Add management.uninstallSelf to API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/management/management_api.h
diff --git a/chrome/browser/extensions/api/management/management_api.h b/chrome/browser/extensions/api/management/management_api.h
index 8bf049eaca3316aee479ea7f1c89f6ea76c3805f..96e66cb36de9668c02825c608655bb08e80bfe82 100644
--- a/chrome/browser/extensions/api/management/management_api.h
+++ b/chrome/browser/extensions/api/management/management_api.h
@@ -121,22 +121,22 @@ class ManagementSetEnabledFunction : public AsyncManagementFunction,
scoped_ptr<ExtensionInstallPrompt> install_prompt_;
};
-class ManagementUninstallFunction : public AsyncManagementFunction,
+class ManagementUninstallFunctionBase : public AsyncManagementFunction,
public ExtensionUninstallDialog::Delegate {
public:
- DECLARE_EXTENSION_FUNCTION("management.uninstall", MANAGEMENT_UNINSTALL)
+ ManagementUninstallFunctionBase();
- ManagementUninstallFunction();
static void SetAutoConfirmForTest(bool should_proceed);
// ExtensionUninstallDialog::Delegate implementation.
virtual void ExtensionUninstallAccepted() OVERRIDE;
virtual void ExtensionUninstallCanceled() OVERRIDE;
- private:
- virtual ~ManagementUninstallFunction();
+ protected:
+ virtual ~ManagementUninstallFunctionBase();
- virtual bool RunImpl() OVERRIDE;
+ bool Uninstall(const std::string& extension_id, bool show_confirm_dialog);
+ private:
// If should_uninstall is true, this method does the actual uninstall.
// If |show_uninstall_dialog|, then this function will be called by one of the
@@ -147,6 +147,31 @@ class ManagementUninstallFunction : public AsyncManagementFunction,
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
};
+class ManagementUninstallFunction : public ManagementUninstallFunctionBase {
+ public:
+ DECLARE_EXTENSION_FUNCTION("management.uninstall", MANAGEMENT_UNINSTALL)
+
+ ManagementUninstallFunction();
+
+ private:
+ virtual ~ManagementUninstallFunction();
+
+ virtual bool RunImpl() OVERRIDE;
+};
+
+class ManagementUninstallSelfFunction : public ManagementUninstallFunctionBase {
+ public:
+ DECLARE_EXTENSION_FUNCTION("management.uninstallSelf",
+ MANAGEMENT_UNINSTALLSELF);
+
+ ManagementUninstallSelfFunction();
+
+ private:
+ virtual ~ManagementUninstallSelfFunction();
+
+ virtual bool RunImpl() OVERRIDE;
+};
+
class ManagementEventRouter : public content::NotificationObserver {
public:
explicit ManagementEventRouter(Profile* profile);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698