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

Side by Side Diff: components/update_client/update_client_errors.h

Issue 2479633003: Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_
6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_
7 7
8 namespace update_client { 8 namespace update_client {
9 9
10 // Errors generated as a result of calling UpdateClient member functions. 10 // Errors generated as a result of calling UpdateClient member functions.
(...skipping 23 matching lines...) Expand all
34 // the Chrome net stack. 34 // the Chrome net stack.
35 enum class CrxDownloaderError { 35 enum class CrxDownloaderError {
36 NONE = 0, 36 NONE = 0,
37 NO_URL = 10, 37 NO_URL = 10,
38 NO_HASH = 11, 38 NO_HASH = 11,
39 BAD_HASH = 12, // The downloaded file fails the hash verification. 39 BAD_HASH = 12, // The downloaded file fails the hash verification.
40 GENERIC_ERROR = -1 40 GENERIC_ERROR = -1
41 }; 41 };
42 42
43 // These errors are returned with the |kUnpackError| error category and 43 // These errors are returned with the |kUnpackError| error category and
44 // indicate unpacker, patcher, or install errors. 44 // indicate unpacker or patcher error.
45 enum class UnpackerError { 45 enum class UnpackerError {
46 kNone = 0, 46 kNone = 0,
47 kInvalidParams, 47 kInvalidParams = 1,
48 kInvalidFile, 48 kInvalidFile = 2,
49 kUnzipPathError, 49 kUnzipPathError = 3,
50 kUnzipFailed, 50 kUnzipFailed = 4,
51 kNoManifest, 51 // kNoManifest = 5, // Deprecated. Never used.
52 kBadManifest, 52 kBadManifest = 6,
53 kBadExtension, 53 kBadExtension = 7,
54 kInvalidId, 54 kInvalidId = 8,
55 kInstallerError, 55 // kInstallerError = 9, // Deprecated. Don't use.
56 kIoError, 56 kIoError = 10,
57 kDeltaVerificationFailure, 57 kDeltaVerificationFailure = 11,
58 kDeltaBadCommands, 58 kDeltaBadCommands = 12,
59 kDeltaUnsupportedCommand, 59 kDeltaUnsupportedCommand = 13,
60 kDeltaOperationFailure, 60 kDeltaOperationFailure = 14,
61 kDeltaPatchProcessFailure, 61 kDeltaPatchProcessFailure = 15,
62 kDeltaMissingExistingFile, 62 kDeltaMissingExistingFile = 16,
63 kFingerprintWriteFailed, 63 // kFingerprintWriteFailed = 17, // Deprecated. Don't use.
64 }; 64 };
65 65
66 // These errors are returned with the |kServiceError| error category and 66 // These errors are returned with the |kServiceError| error category and
67 // are returned by the component installers.
68 enum class InstallError {
69 NONE = 0,
70 FINGERPRINT_WRITE_FAILED = 2,
71 BAD_MANIFEST = 3,
72 GENERIC_ERROR = 9, // Matches kInstallerError for compatibility.
73 CUSTOM_ERROR_BASE = 100, // Specific installer errors go above this value.
74 };
75
76 // These errors are returned with the |kInstallError| error category and
67 // indicate critical or configuration errors in the update service. 77 // indicate critical or configuration errors in the update service.
68 enum class ServiceError { 78 enum class ServiceError {
69 NONE = 0, 79 NONE = 0,
70 SERVICE_WAIT_FAILED = 1, 80 SERVICE_WAIT_FAILED = 1,
71 UPDATE_DISABLED = 2, 81 UPDATE_DISABLED = 2,
72 }; 82 };
73 83
74 } // namespace update_client 84 } // namespace update_client
75 85
76 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_ 86 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_
OLDNEW
« no previous file with comments | « components/update_client/update_client.h ('k') | components/update_client/update_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698