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

Side by Side Diff: chrome/common/extensions/api/webstore.json

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 [ 5 [
6 { 6 {
7 "namespace": "webstore", 7 "namespace": "webstore",
8 "description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.", 8 "description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.",
9 "types": [ 9 "types": [
10 { 10 {
11 "id": "InstallStage", 11 "id": "InstallStage",
12 "type": "string", 12 "type": "string",
13 "enum": ["installing", "downloading"], 13 "enum": ["installing", "downloading"],
14 "description": "Enum used to indicate the stage of the installation proc ess. 'downloading' indicates that the necessary files are being downloaded, and 'installing' indicates that the files are downloaded and are being actively inst alled." 14 "description": "Enum used to indicate the stage of the installation proc ess. 'downloading' indicates that the necessary files are being downloaded, and 'installing' indicates that the files are downloaded and are being actively inst alled."
15 },
16 {
17 "id": "ErrorCode",
18 "type": "string",
19 "description": "Enum of the possible install results, including error co des sent back in the event that an inline installation has failed.",
20 "enum": [
21 // Keep this list of enums in sync with
22 // chrome/common/extensions/webstore_install_result.h and
23 // chrome/common/extensions/api/webstore/webstore_api_constants.cc!
24 {
25 "description": "An uncommon, unrecognized, or unexpected error. In s ome cases, the readable error string can provide more information.",
26 "name": "otherError"
27 },
28 {
29 "description": "The operation was aborted as the requestor is no lon ger alive.",
30 "name": "aborted"
31 },
32 {
33 "description": "An installation of the same extension is in progress .",
34 "name": "installInProgress"
35 },
36 {
37 "description": "The installation is not permitted.",
38 "name": "notPermitted"
39 },
40 {
41 "description": "Invalid Chrome Web Store item ID.",
42 "name": "invalidId"
43 },
44 {
45 "description": "Failed to retrieve extension metadata from the Web S tore.",
46 "name": "webstoreRequestError"
47 },
48 {
49 "description": "The extension metadata retrieved from the Web Store was invalid.",
50 "name": "invalidWebstoreResponse"
51 },
52 {
53 "description": "An error occurred while parsing the extension manife st retrieved from the Web Store.",
54 "name": "invalidManifest"
55 },
56 {
57 "description": "Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.",
58 "name": "iconError"
59 },
60 {
61 "description": "The user canceled the operation.",
62 "name": "userCanceled"
63 },
64 {
65 "description": "The extension is blacklisted.",
66 "name": "blacklisted"
67 },
68 {
69 "description": "Unsatisfied dependencies, such as shared modules.",
70 "name": "missingDependencies"
71 },
72 {
73 "description": "Unsatisfied requirements, such as webgl.",
74 "name": "requirementViolations"
75 },
76 {
77 "description": "The extension is blocked by management policies.",
78 "name": "blockedByPolicy"
79 },
80 {
81 "description": "The launch feature is not available.",
82 "name": "launchFeatureDisabled"
tmdiep 2014/07/25 00:45:04 I saw this patch while merging. These error codes
83 },
84 {
85 "description": "The launch feature is not supported for the extensio n type.",
86 "name": "launchUnsupportedExtensionType"
87 },
88 {
89 "description": "A launch of the same extension is in progress.",
90 "name": " launchInProgress"
91 }
92 ]
15 } 93 }
16 ], // types 94 ], // types
17 "events": [ 95 "events": [
18 { 96 {
19 "name": "onInstallStageChanged", 97 "name": "onInstallStageChanged",
20 "description": "Fired when an inline installation enters a new InstallSt age. In order to receive notifications about this event, listeners must be regis tered before the inline installation begins.", 98 "description": "Fired when an inline installation enters a new InstallSt age. In order to receive notifications about this event, listeners must be regis tered before the inline installation begins.",
21 "type": "function", 99 "type": "function",
22 "parameters": [ 100 "parameters": [
23 { 101 {
24 "name": "stage", 102 "name": "stage",
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }, 138 },
61 { 139 {
62 "name": "failureCallback", 140 "name": "failureCallback",
63 "type": "function", 141 "type": "function",
64 "optional": true, 142 "optional": true,
65 "parameters": [ 143 "parameters": [
66 { 144 {
67 "name": "error", 145 "name": "error",
68 "type": "string", 146 "type": "string",
69 "description": "The failure detail. You may wish to inspect or l og this for debugging purposes, but you should not rely on specific strings bein g passed back." 147 "description": "The failure detail. You may wish to inspect or l og this for debugging purposes, but you should not rely on specific strings bein g passed back."
148 },
149 {
150 "name": "errorCode",
151 "$ref": "ErrorCode",
152 "optional": "true",
153 "description": "The error code from the stable set of possible e rrors."
70 } 154 }
71 ], 155 ],
72 "description": "This function is invoked when inline installation do es not successfully complete. Possible reasons for this include the user canceli ng the dialog, the linked item not being found in the store, or the install bein g initiated from a non-verified site." 156 "description": "This function is invoked when inline installation do es not successfully complete. Possible reasons for this include the user canceli ng the dialog, the linked item not being found in the store, or the install bein g initiated from a non-verified site."
73 } 157 }
74 ] 158 ]
75 } // install 159 } // install
76 ] // functions 160 ] // functions
77 } // webstore 161 } // webstore
78 ] 162 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698