Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Defines all install related constants that need to be used by Chrome as | 5 // Defines all install related constants that need to be used by Chrome as |
| 6 // well as Chrome Installer. | 6 // well as Chrome Installer. |
| 7 | 7 |
| 8 #ifndef CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ | 8 #ifndef CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ |
| 9 #define CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ | 9 #define CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 dont_change_enum); | 85 dont_change_enum); |
| 86 | 86 |
| 87 // The type of an update archive. | 87 // The type of an update archive. |
| 88 enum ArchiveType { | 88 enum ArchiveType { |
| 89 UNKNOWN_ARCHIVE_TYPE, // Unknown or uninitialized. | 89 UNKNOWN_ARCHIVE_TYPE, // Unknown or uninitialized. |
| 90 FULL_ARCHIVE_TYPE, // Full chrome.7z archive. | 90 FULL_ARCHIVE_TYPE, // Full chrome.7z archive. |
| 91 INCREMENTAL_ARCHIVE_TYPE // Incremental or differential archive. | 91 INCREMENTAL_ARCHIVE_TYPE // Incremental or differential archive. |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 // Stages of an installation reported through Google Update on failure. | 94 // Stages of an installation reported through Google Update on failure. |
| 95 // The order and value of existing enums must not change. Please add new | |
| 96 // values to the end (before NUM_STAGES) and update the compile assert to | |
| 97 // assert on the last value added. | |
| 95 enum InstallerStage { | 98 enum InstallerStage { |
| 96 NO_STAGE, // 0: No stage to report. | 99 NO_STAGE, // 0: No stage to report. |
| 97 PRECONDITIONS, // 1: Evaluating pre-install conditions. | 100 PRECONDITIONS, // 1: Evaluating pre-install conditions. |
| 98 UNCOMPRESSING, // 2: Uncompressing chrome.packed.7z. | 101 UNCOMPRESSING, // 2: Uncompressing chrome.packed.7z. |
| 99 ENSEMBLE_PATCHING, // 3: Patching chrome.7z using courgette. | 102 ENSEMBLE_PATCHING, // 3: Patching chrome.7z using courgette. |
| 100 BINARY_PATCHING, // 4: Patching chrome.7z using bspatch. | 103 BINARY_PATCHING, // 4: Patching chrome.7z using bspatch. |
| 101 UNPACKING, // 5: Unpacking chrome.7z. | 104 UNPACKING, // 5: Unpacking chrome.7z. |
| 102 BUILDING, // 6: Building the install work item list. | 105 BUILDING, // 6: Building the install work item list. |
| 103 EXECUTING, // 7: Executing the install work item list. | 106 EXECUTING, // 7: Executing the install work item list. |
| 104 ROLLINGBACK, // 8: Rolling-back the install work item list. | 107 ROLLINGBACK, // 8: Rolling-back the install work item list. |
| 105 REFRESHING_POLICY, // 9: Refreshing the elevation policy. | 108 REFRESHING_POLICY, // 9: Refreshing the elevation policy. |
| 106 UPDATING_CHANNELS, // 10: Updating channel information. | 109 UPDATING_CHANNELS, // 10: Updating channel information. |
| 107 COPYING_PREFERENCES_FILE, // 11: Copying preferences file. | 110 COPYING_PREFERENCES_FILE, // 11: Copying preferences file. |
| 108 CREATING_SHORTCUTS, // 12: Creating shortcuts. | 111 CREATING_SHORTCUTS, // 12: Creating shortcuts. |
| 109 REGISTERING_CHROME, // 13: Performing Chrome registration. | 112 REGISTERING_CHROME, // 13: Performing Chrome registration. |
| 110 REMOVING_OLD_VERSIONS, // 14: Deleting old version directories. | 113 REMOVING_OLD_VERSIONS, // 14: Deleting old version directories. |
| 111 FINISHING, // 15: Finishing the install. | 114 FINISHING, // 15: Finishing the install. |
| 115 CONFIGURE_AUTO_LAUNCH, // 16: Configuring Chrome to auto-launch. | |
| 112 NUM_STAGES // 16: The number of stages. | 116 NUM_STAGES // 16: The number of stages. |
|
Roger Tawa OOO till Jul 10th
2011/12/07 15:38:37
16 --> 17 ?
grt (UTC plus 2)
2011/12/07 15:56:35
nice catch
Finnur
2011/12/13 15:53:24
Done.
| |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 // When we start reporting the numerical values from the enum, the order | 119 // When we start reporting the numerical values from the enum, the order |
| 116 // above MUST be preserved. | 120 // above MUST be preserved. |
| 117 COMPILE_ASSERT(FINISHING == 15, | 121 COMPILE_ASSERT(CONFIGURE_AUTO_LAUNCH == 16, |
| 118 never_ever_ever_change_InstallerStage_values_bang); | 122 never_ever_ever_change_InstallerStage_values_bang); |
|
Roger Tawa OOO till Jul 10th
2011/12/07 15:38:37
how does this compile assert help ensure that the
grt (UTC plus 2)
2011/12/07 15:56:35
it's weak, but it's better than nothing at all. t
Roger Tawa OOO till Jul 10th
2011/12/07 16:17:16
OK makes sense Greg. Yeah, tricky problem to solv
| |
| 119 | 123 |
| 120 namespace switches { | 124 namespace switches { |
| 125 extern const char kAutoLaunchChrome[]; | |
| 121 extern const char kCeee[]; | 126 extern const char kCeee[]; |
| 122 extern const char kChrome[]; | 127 extern const char kChrome[]; |
| 123 extern const char kChromeFrame[]; | 128 extern const char kChromeFrame[]; |
| 124 extern const char kChromeFrameQuickEnable[]; | 129 extern const char kChromeFrameQuickEnable[]; |
| 125 extern const char kChromeFrameReadyMode[]; | 130 extern const char kChromeFrameReadyMode[]; |
| 126 extern const char kChromeFrameReadyModeOptIn[]; | 131 extern const char kChromeFrameReadyModeOptIn[]; |
| 127 extern const char kChromeFrameReadyModeTempOptOut[]; | 132 extern const char kChromeFrameReadyModeTempOptOut[]; |
| 128 extern const char kChromeFrameReadyModeEndTempOptOut[]; | 133 extern const char kChromeFrameReadyModeEndTempOptOut[]; |
| 129 extern const char kChromeSxS[]; | 134 extern const char kChromeSxS[]; |
| 130 extern const char kCreateAllShortcuts[]; | 135 extern const char kCreateAllShortcuts[]; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 // Google Update named environment variable that implies kSystemLevel. | 202 // Google Update named environment variable that implies kSystemLevel. |
| 198 extern const char kGoogleUpdateIsMachineEnvVar[]; | 203 extern const char kGoogleUpdateIsMachineEnvVar[]; |
| 199 | 204 |
| 200 // Product options. | 205 // Product options. |
| 201 extern const wchar_t kOptionMultiInstall[]; | 206 extern const wchar_t kOptionMultiInstall[]; |
| 202 extern const wchar_t kOptionReadyMode[]; | 207 extern const wchar_t kOptionReadyMode[]; |
| 203 | 208 |
| 204 } // namespace installer | 209 } // namespace installer |
| 205 | 210 |
| 206 #endif // CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ | 211 #endif // CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ |
| OLD | NEW |