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