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

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: modify api docs 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
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 07553c88a3a10ea9b972647191276a5f008b4548..019926c1df97c6a2290d4c184a57457c4213a558 100644
--- a/chrome/browser/extensions/api/management/management_api.h
+++ b/chrome/browser/extensions/api/management/management_api.h
@@ -131,9 +131,13 @@ class ManagementUninstallFunction : public AsyncManagementFunction,
virtual void ExtensionUninstallAccepted() OVERRIDE;
virtual void ExtensionUninstallCanceled() OVERRIDE;
- private:
+ protected:
virtual ~ManagementUninstallFunction();
+ bool DoUninstall(bool show_confirm_dialog);
+ void set_extension_id(const std::string& extension_id);
+
+ private:
virtual bool RunImpl() OVERRIDE;
// If should_uninstall is true, this method does the actual uninstall.
@@ -145,6 +149,18 @@ class ManagementUninstallFunction : public AsyncManagementFunction,
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
};
+class ManagementUninstallSelfFunction : public ManagementUninstallFunction {
koz (OOO until 15th September) 2013/01/29 05:20:26 It's not common for functions to subclass each oth
calamity 2013/01/29 06:06:16 Done.
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("management.uninstallSelf");
+
+ ManagementUninstallSelfFunction();
+
+ private:
+ virtual ~ManagementUninstallSelfFunction();
+
+ virtual bool RunImpl() OVERRIDE;
+};
+
class ManagementEventRouter : public content::NotificationObserver {
public:
explicit ManagementEventRouter(Profile* profile);

Powered by Google App Engine
This is Rietveld 408576698