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

Unified Diff: chrome/common/extensions/api/webstore/webstore_api_constants.cc

Issue 384823002: Introduce a stable set of errors for inline install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace printf with vlog(1) in unrelated code so it passes presubmit Created 6 years, 5 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/common/extensions/api/webstore/webstore_api_constants.cc
diff --git a/chrome/common/extensions/api/webstore/webstore_api_constants.cc b/chrome/common/extensions/api/webstore/webstore_api_constants.cc
index e766bce69a7e99f7daa0bd0d439dfc4bb822b667..5aa92b1591ebfe8f2d83e29cd78eee6b752abc71 100644
--- a/chrome/common/extensions/api/webstore/webstore_api_constants.cc
+++ b/chrome/common/extensions/api/webstore/webstore_api_constants.cc
@@ -4,10 +4,41 @@
#include "chrome/common/extensions/api/webstore/webstore_api_constants.h"
+#include "base/macros.h"
+#include "chrome/common/extensions/webstore_install_result.h"
+
namespace extensions {
namespace api {
namespace webstore {
+// IMPORTANT: Keep this list in sync with both the definition in
+// chrome/common/extensions/api/webstore.json and
+// chrome/common/extensions/webstore_install_result.h!
+const char* kInstallResultCodes[] = {
+ "success",
+ "otherError",
+ "aborted",
+ "installInProgress",
+ "notPermitted",
+ "invalidId",
+ "webstoreRequestError",
+ "invalidWebstoreResponse",
+ "invalidManifest",
+ "iconError",
+ "userCancelled",
+ "blacklisted",
+ "missingDependencies",
+ "requirementViolations",
+ "blockedByPolicy",
+ "launchFeatureDisabled",
+ "launchUnsupportedExtensionType",
+ "launchInProgress",
+};
+
+COMPILE_ASSERT(arraysize(kInstallResultCodes) ==
+ webstore_install::RESULT_LAST + 1,
+ must_keep_webstore_install_result_and_api_constants_in_sync);
+
// The "downloading" stage begins when the installer starts downloading modules
// for the extension.
const char kInstallStageDownloading[] = "downloading";

Powered by Google App Engine
This is Rietveld 408576698