Index: chrome/browser/extensions/api/developer_private/developer_private_api.h |
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h |
index f29119b38d2aa19e83ef62307d907aa4ec153735..a52c4c9f62ae4df88c4b5d16d2e6faec89a08371 100644 |
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h |
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/extensions/error_console/error_console.h" |
#include "chrome/browser/extensions/extension_uninstall_dialog.h" |
#include "chrome/browser/extensions/pack_extension_job.h" |
+#include "chrome/common/extensions/webstore_install_result.h" |
#include "extensions/browser/browser_context_keyed_api_factory.h" |
#include "extensions/browser/event_router.h" |
#include "extensions/browser/extension_registry_observer.h" |
@@ -174,18 +175,20 @@ class DeveloperPrivateAPIFunction : public ChromeUIThreadExtensionFunction { |
// Returns the extension with the given |id| from the registry, including |
// all possible extensions (enabled, disabled, terminated, etc). |
const Extension* GetExtensionById(const std::string& id); |
+ |
+ // Returns the extension with the given |id| from the registry, only checking |
+ // enabled extensions. |
+ const Extension* GetEnabledExtensionById(const std::string& id); |
}; |
-class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction { |
+class DeveloperPrivateAutoUpdateFunction : public DeveloperPrivateAPIFunction { |
public: |
DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate", |
DEVELOPERPRIVATE_AUTOUPDATE) |
protected: |
~DeveloperPrivateAutoUpdateFunction() override; |
- |
- // ExtensionFunction: |
- bool RunSync() override; |
+ ResponseAction Run() override; |
}; |
class DeveloperPrivateGetItemsInfoFunction |
@@ -476,6 +479,41 @@ class DeveloperPrivateDeleteExtensionErrorsFunction |
ResponseAction Run() override; |
}; |
+class DeveloperPrivateRepairExtensionFunction |
+ : public DeveloperPrivateAPIFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.repairExtension", |
+ DEVELOPERPRIVATE_REPAIREXTENSION); |
+ |
+ protected: |
+ ~DeveloperPrivateRepairExtensionFunction() override; |
+ ResponseAction Run() override; |
+ |
+ void OnReinstallComplete(bool success, |
+ const std::string& error, |
+ webstore_install::Result result); |
+}; |
+ |
+class DeveloperPrivateShowOptionsFunction : public DeveloperPrivateAPIFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.showOptions", |
+ DEVELOPERPRIVATE_SHOWOPTIONS); |
+ |
+ protected: |
+ ~DeveloperPrivateShowOptionsFunction() override; |
+ ResponseAction Run() override; |
+}; |
+ |
+class DeveloperPrivateShowPathFunction : public DeveloperPrivateAPIFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.showPath", |
+ DEVELOPERPRIVATE_SHOWPATH); |
+ |
+ protected: |
+ ~DeveloperPrivateShowPathFunction() override; |
+ ResponseAction Run() override; |
+}; |
+ |
} // namespace api |
} // namespace extensions |