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

Unified Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 1085113002: [Extensions UI] Use developerPrivate API for repair, options, show path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ben's Created 5 years, 8 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/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

Powered by Google App Engine
This is Rietveld 408576698