OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h" | 5 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h" |
6 | 6 |
| 7 #include "base/macros.h" |
| 8 #include "chrome/common/extensions/webstore_install_result.h" |
| 9 |
7 namespace extensions { | 10 namespace extensions { |
8 namespace api { | 11 namespace api { |
9 namespace webstore { | 12 namespace webstore { |
10 | 13 |
| 14 // IMPORTANT: Keep this list in sync with both the definition in |
| 15 // chrome/common/extensions/api/webstore.json and |
| 16 // chrome/common/extensions/webstore_install_result.h! |
| 17 const char* kInstallResultCodes[] = { |
| 18 "success", |
| 19 "otherError", |
| 20 "aborted", |
| 21 "installInProgress", |
| 22 "notPermitted", |
| 23 "invalidId", |
| 24 "webstoreRequestError", |
| 25 "invalidWebstoreResponse", |
| 26 "invalidManifest", |
| 27 "iconError", |
| 28 "userCancelled", |
| 29 "blacklisted", |
| 30 "missingDependencies", |
| 31 "requirementViolations", |
| 32 "blockedByPolicy", |
| 33 "launchFeatureDisabled", |
| 34 "launchUnsupportedExtensionType", |
| 35 "launchInProgress", |
| 36 }; |
| 37 |
| 38 COMPILE_ASSERT(arraysize(kInstallResultCodes) == |
| 39 webstore_install::RESULT_LAST + 1, |
| 40 must_keep_webstore_install_result_and_api_constants_in_sync); |
| 41 |
11 // The "downloading" stage begins when the installer starts downloading modules | 42 // The "downloading" stage begins when the installer starts downloading modules |
12 // for the extension. | 43 // for the extension. |
13 const char kInstallStageDownloading[] = "downloading"; | 44 const char kInstallStageDownloading[] = "downloading"; |
14 | 45 |
15 // The "installing" stage begins once all downloads are complete, and the | 46 // The "installing" stage begins once all downloads are complete, and the |
16 // CrxInstaller begins. | 47 // CrxInstaller begins. |
17 const char kInstallStageInstalling[] = "installing"; | 48 const char kInstallStageInstalling[] = "installing"; |
18 | 49 |
19 // The method in custom_webstore_bindings.js triggered when we enter a new | 50 // The method in custom_webstore_bindings.js triggered when we enter a new |
20 // install stage ("downloading" or "installing"). | 51 // install stage ("downloading" or "installing"). |
21 const char kOnInstallStageChangedMethodName[] = "onInstallStageChanged"; | 52 const char kOnInstallStageChangedMethodName[] = "onInstallStageChanged"; |
22 | 53 |
23 // The method in custom_webstore_bindings.js triggered when we update | 54 // The method in custom_webstore_bindings.js triggered when we update |
24 // download progress. | 55 // download progress. |
25 const char kOnDownloadProgressMethodName[] = "onDownloadProgress"; | 56 const char kOnDownloadProgressMethodName[] = "onDownloadProgress"; |
26 | 57 |
27 } // namespace webstore | 58 } // namespace webstore |
28 } // namespace api | 59 } // namespace api |
29 } // namespace extensions | 60 } // namespace extensions |
OLD | NEW |