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

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

Issue 8488012: Fix for management API related to escalated permissions disabled extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased again Created 9 years, 1 month 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/extension_management_api.h
diff --git a/chrome/browser/extensions/extension_management_api.h b/chrome/browser/extensions/extension_management_api.h
index d73b4079bcdace68a3f70022ee266a2a7cf35ca5..b7e6b8011c87fd051ac4d1b9131069da8ad20f18 100644
--- a/chrome/browser/extensions/extension_management_api.h
+++ b/chrome/browser/extensions/extension_management_api.h
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/browser/extensions/extension_install_ui.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -18,6 +19,11 @@ class ExtensionManagementFunction : public SyncExtensionFunction {
ExtensionService* service();
};
+class AsyncExtensionManagementFunction : public AsyncExtensionFunction {
+ protected:
+ ExtensionService* service();
+};
+
class GetAllExtensionsFunction : public ExtensionManagementFunction {
virtual ~GetAllExtensionsFunction() {}
virtual bool RunImpl() OVERRIDE;
@@ -54,9 +60,24 @@ class LaunchAppFunction : public ExtensionManagementFunction {
DECLARE_EXTENSION_FUNCTION_NAME("management.launchApp");
};
-class SetEnabledFunction : public ExtensionManagementFunction {
- virtual ~SetEnabledFunction() {}
+class SetEnabledFunction : public AsyncExtensionManagementFunction,
+ public ExtensionInstallUI::Delegate {
+ public:
+ SetEnabledFunction();
+ virtual ~SetEnabledFunction();
virtual bool RunImpl() OVERRIDE;
+
+ protected:
+ // ExtensionInstalUI::Delegate.
+ virtual void InstallUIProceed() OVERRIDE;
+ virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
+
+ private:
+ std::string extension_id_;
+
+ // Used for prompting to re-enable items with permissions escalation updates.
+ scoped_ptr<ExtensionInstallUI> install_ui_;
+
DECLARE_EXTENSION_FUNCTION_NAME("management.setEnabled");
};
« no previous file with comments | « chrome/browser/extensions/extension_install_dialog.cc ('k') | chrome/browser/extensions/extension_management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698