File: update_client_errors.h

package info (click to toggle)
chromium-browser 57.0.2987.98-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,637,852 kB
  • ctags: 2,544,394
  • sloc: cpp: 12,815,961; ansic: 3,676,222; python: 1,147,112; asm: 526,608; java: 523,212; xml: 286,794; perl: 92,654; sh: 86,408; objc: 73,271; makefile: 27,698; cs: 18,487; yacc: 13,031; tcl: 12,957; pascal: 4,875; ml: 4,716; lex: 3,904; sql: 3,862; ruby: 1,982; lisp: 1,508; php: 1,368; exp: 404; awk: 325; csh: 117; jsp: 39; sed: 37
file content (93 lines) | stat: -rw-r--r-- 2,803 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright 2016 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.

#ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_
#define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_

namespace update_client {

// Errors generated as a result of calling UpdateClient member functions.
// These errors are not sent in pings.
enum class Error {
  INVALID_ARGUMENT = -1,
  NONE = 0,
  UPDATE_IN_PROGRESS = 1,
  UPDATE_CANCELED = 2,
  RETRY_LATER = 3,
  SERVICE_ERROR = 4,
  UPDATE_CHECK_ERROR = 5,
};

// These errors are sent in pings. Add new values only to the bottom of
// the enums below; the order must be kept stable.
enum class ErrorCategory {
  kErrorNone = 0,
  kNetworkError,
  kUnpackError,
  kInstallError,
  kServiceError,  // Runtime errors which occur in the service itself.
};

// These errors are returned with the |kNetworkError| error category. This
// category could include other errors such as the errors defined by
// the Chrome net stack.
enum class CrxDownloaderError {
  NONE = 0,
  NO_URL = 10,
  NO_HASH = 11,
  BAD_HASH = 12,  // The downloaded file fails the hash verification.
  GENERIC_ERROR = -1
};

// These errors are returned with the |kUnpackError| error category and
// indicate unpacker or patcher error.
enum class UnpackerError {
  kNone = 0,
  kInvalidParams = 1,
  kInvalidFile = 2,
  kUnzipPathError = 3,
  kUnzipFailed = 4,
  // kNoManifest = 5,         // Deprecated. Never used.
  kBadManifest = 6,
  kBadExtension = 7,
  kInvalidId = 8,
  // kInstallerError = 9,     // Deprecated. Don't use.
  kIoError = 10,
  kDeltaVerificationFailure = 11,
  kDeltaBadCommands = 12,
  kDeltaUnsupportedCommand = 13,
  kDeltaOperationFailure = 14,
  kDeltaPatchProcessFailure = 15,
  kDeltaMissingExistingFile = 16,
  // kFingerprintWriteFailed = 17,    // Deprecated. Don't use.
};

// These errors are returned with the |kServiceError| error category and
// are returned by the component installers.
enum class InstallError {
  NONE = 0,
  FINGERPRINT_WRITE_FAILED = 2,
  BAD_MANIFEST = 3,
  GENERIC_ERROR = 9,  // Matches kInstallerError for compatibility.
  MOVE_FILES_ERROR = 10,
  SET_PERMISSIONS_FAILED = 11,
  INVALID_VERSION = 12,
  VERSION_NOT_UPGRADED = 13,
  NO_DIR_COMPONENT_USER = 14,
  CLEAN_INSTALL_DIR_FAILED = 15,
  INSTALL_VERIFICATION_FAILED = 16,
  CUSTOM_ERROR_BASE = 100,  // Specific installer errors go above this value.
};

// These errors are returned with the |kInstallError| error category and
// indicate critical or configuration errors in the update service.
enum class ServiceError {
  NONE = 0,
  SERVICE_WAIT_FAILED = 1,
  UPDATE_DISABLED = 2,
};

}  // namespace update_client

#endif  // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_