[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | ced522c | 2014-07-23 20:23:59 | [diff] [blame] | 5 | #ifndef CHROME_COMMON_EXTENSIONS_WEBSTORE_INSTALL_RESULT_H_ |
| 6 | #define CHROME_COMMON_EXTENSIONS_WEBSTORE_INSTALL_RESULT_H_ |
[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 7 | |
| 8 | namespace extensions { |
| 9 | |
| 10 | namespace webstore_install { |
| 11 | |
rdevlin.cronin | d30a8bd | 2016-06-30 16:02:29 | [diff] [blame^] | 12 | extern const char kInvalidWebstoreItemId[]; |
| 13 | extern const char kWebstoreRequestError[]; |
| 14 | extern const char kInvalidWebstoreResponseError[]; |
| 15 | extern const char kInvalidManifestError[]; |
| 16 | extern const char kUserCancelledError[]; |
| 17 | extern const char kExtensionIsBlacklisted[]; |
| 18 | extern const char kInstallInProgressError[]; |
| 19 | |
[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 20 | // Result codes returned by WebstoreStandaloneInstaller and its subclasses. |
| 21 | enum Result { |
| 22 | // Successful operation. |
| 23 | SUCCESS, |
| 24 | |
| 25 | // Unknown error. |
[email protected] | ced522c | 2014-07-23 20:23:59 | [diff] [blame] | 26 | OTHER_ERROR, |
[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 27 | |
| 28 | // The operation was aborted as the requestor is no longer alive. |
| 29 | ABORTED, |
| 30 | |
[email protected] | 773272b | 2014-07-18 05:48:35 | [diff] [blame] | 31 | // An installation of the same extension is in progress. |
| 32 | INSTALL_IN_PROGRESS, |
| 33 | |
[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 34 | // The installation is not permitted. |
| 35 | NOT_PERMITTED, |
| 36 | |
| 37 | // Invalid Chrome Web Store item ID. |
| 38 | INVALID_ID, |
| 39 | |
| 40 | // Failed to retrieve extension metadata from the Web Store. |
| 41 | WEBSTORE_REQUEST_ERROR, |
| 42 | |
| 43 | // The extension metadata retrieved from the Web Store was invalid. |
| 44 | INVALID_WEBSTORE_RESPONSE, |
| 45 | |
| 46 | // An error occurred while parsing the extension manifest retrieved from the |
| 47 | // Web Store. |
| 48 | INVALID_MANIFEST, |
| 49 | |
| 50 | // Failed to retrieve the extension's icon from the Web Store, or the icon |
| 51 | // was invalid. |
| 52 | ICON_ERROR, |
| 53 | |
| 54 | // The user cancelled the operation. |
| 55 | USER_CANCELLED, |
| 56 | |
| 57 | // The extension is blacklisted. |
| 58 | BLACKLISTED, |
| 59 | |
| 60 | // Unsatisfied dependencies, such as shared modules. |
| 61 | MISSING_DEPENDENCIES, |
| 62 | |
| 63 | // Unsatisfied requirements, such as webgl. |
| 64 | REQUIREMENT_VIOLATIONS, |
| 65 | |
| 66 | // The extension is blocked by management policies. |
| 67 | BLOCKED_BY_POLICY, |
| 68 | |
| 69 | // The launch feature is not available. |
| 70 | LAUNCH_FEATURE_DISABLED, |
| 71 | |
| 72 | // The launch feature is not supported for the extension type. |
[email protected] | 773272b | 2014-07-18 05:48:35 | [diff] [blame] | 73 | LAUNCH_UNSUPPORTED_EXTENSION_TYPE, |
| 74 | |
| 75 | // A launch of the same extension is in progress. |
[email protected] | ced522c | 2014-07-23 20:23:59 | [diff] [blame] | 76 | LAUNCH_IN_PROGRESS, |
| 77 | |
| 78 | // The final (and unused) result type for enum verification. |
| 79 | // New results should go above this entry, and this entry should be updated. |
| 80 | RESULT_LAST = LAUNCH_IN_PROGRESS, |
[email protected] | 9c7b309 | 2014-06-21 01:19:03 | [diff] [blame] | 81 | }; |
| 82 | |
| 83 | } // namespace webstore_install |
| 84 | |
| 85 | } // namespace extensions |
| 86 | |
[email protected] | ced522c | 2014-07-23 20:23:59 | [diff] [blame] | 87 | #endif // CHROME_COMMON_EXTENSIONS_WEBSTORE_INSTALL_RESULT_H_ |