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

Side by Side Diff: chrome/installer/util/util_constants.h

Issue 821673004: replace COMPILE_ASSERT with static_assert in chrome/installer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // binaries will be uninstalled if they are not 88 // binaries will be uninstalled if they are not
89 // in use. 89 // in use.
90 UNUSED_BINARIES_UNINSTALLED, // 52. The binaries were uninstalled. 90 UNUSED_BINARIES_UNINSTALLED, // 52. The binaries were uninstalled.
91 UNSUPPORTED_OPTION, // 53. An unsupported legacy option was given. 91 UNSUPPORTED_OPTION, // 53. An unsupported legacy option was given.
92 CPU_NOT_SUPPORTED, // 54. Current OS not supported 92 CPU_NOT_SUPPORTED, // 54. Current OS not supported
93 REENABLE_UPDATES_SUCCEEDED, // 55. Autoupdates are now enabled. 93 REENABLE_UPDATES_SUCCEEDED, // 55. Autoupdates are now enabled.
94 REENABLE_UPDATES_FAILED, // 56. Autoupdates could not be enabled. 94 REENABLE_UPDATES_FAILED, // 56. Autoupdates could not be enabled.
95 UNPACKING_FAILED, // 57. Unpacking the (possibly patched) 95 UNPACKING_FAILED, // 57. Unpacking the (possibly patched)
96 // uncompressed archive failed. 96 // uncompressed archive failed.
97 97
98 // Friendly reminder: note the COMPILE_ASSERT below. 98 // Friendly reminder: note the static_assert below.
99 }; 99 };
100 100
101 101
102 // Existing InstallStatus values must not change. Always add to the end. 102 // Existing InstallStatus values must not change. Always add to the end.
103 COMPILE_ASSERT(installer::UNPACKING_FAILED == 57, 103 static_assert(installer::UNPACKING_FAILED == 57,
104 dont_change_enum); 104 "dont change enum");
105 105
106 // The type of an update archive. 106 // The type of an update archive.
107 enum ArchiveType { 107 enum ArchiveType {
108 UNKNOWN_ARCHIVE_TYPE, // Unknown or uninitialized. 108 UNKNOWN_ARCHIVE_TYPE, // Unknown or uninitialized.
109 FULL_ARCHIVE_TYPE, // Full chrome.7z archive. 109 FULL_ARCHIVE_TYPE, // Full chrome.7z archive.
110 INCREMENTAL_ARCHIVE_TYPE // Incremental or differential archive. 110 INCREMENTAL_ARCHIVE_TYPE // Incremental or differential archive.
111 }; 111 };
112 112
113 // Stages of an installation reported through Google Update on failure. 113 // Stages of an installation reported through Google Update on failure.
114 // The order and value of existing enums must not change. Please add new 114 // The order and value of existing enums must not change. Please add new
(...skipping 19 matching lines...) Expand all
134 CONFIGURE_AUTO_LAUNCH, // 16: Configuring Chrome to auto-launch. 134 CONFIGURE_AUTO_LAUNCH, // 16: Configuring Chrome to auto-launch.
135 CREATING_VISUAL_MANIFEST, // 17: Creating VisualElementsManifest.xml 135 CREATING_VISUAL_MANIFEST, // 17: Creating VisualElementsManifest.xml
136 DEFERRING_TO_HIGHER_VERSION, // 18: Deferring to an installed higher version. 136 DEFERRING_TO_HIGHER_VERSION, // 18: Deferring to an installed higher version.
137 UNINSTALLING_BINARIES, // 19: Uninstalling unused binaries. 137 UNINSTALLING_BINARIES, // 19: Uninstalling unused binaries.
138 UNINSTALLING_CHROME_FRAME, // 20: Uninstalling multi-install Chrome Frame. 138 UNINSTALLING_CHROME_FRAME, // 20: Uninstalling multi-install Chrome Frame.
139 NUM_STAGES // 21: The number of stages. 139 NUM_STAGES // 21: The number of stages.
140 }; 140 };
141 141
142 // When we start reporting the numerical values from the enum, the order 142 // When we start reporting the numerical values from the enum, the order
143 // above MUST be preserved. 143 // above MUST be preserved.
144 COMPILE_ASSERT(UNINSTALLING_CHROME_FRAME == 20, 144 static_assert(UNINSTALLING_CHROME_FRAME == 20,
145 never_ever_ever_change_InstallerStage_values_bang); 145 "never ever ever change InstallerStage values!");
146 146
147 namespace switches { 147 namespace switches {
148 148
149 extern const char kAutoLaunchChrome[]; 149 extern const char kAutoLaunchChrome[];
150 extern const char kChrome[]; 150 extern const char kChrome[];
151 extern const char kChromeAppHostDeprecated[]; // TODO(huangs): Remove by M27. 151 extern const char kChromeAppHostDeprecated[]; // TODO(huangs): Remove by M27.
152 extern const char kChromeAppLauncher[]; 152 extern const char kChromeAppLauncher[];
153 extern const char kChromeFrame[]; 153 extern const char kChromeFrame[];
154 extern const char kChromeSxS[]; 154 extern const char kChromeSxS[];
155 extern const char kConfigureUserSettings[]; 155 extern const char kConfigureUserSettings[];
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 const int kCourgetteErrorOffset = 300; 264 const int kCourgetteErrorOffset = 300;
265 const int kBsdiffErrorOffset = 600; 265 const int kBsdiffErrorOffset = 600;
266 266
267 // Arguments to --patch switch 267 // Arguments to --patch switch
268 extern const char kCourgette[]; 268 extern const char kCourgette[];
269 extern const char kBsdiff[]; 269 extern const char kBsdiff[];
270 270
271 } // namespace installer 271 } // namespace installer
272 272
273 #endif // CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_ 273 #endif // CHROME_INSTALLER_UTIL_UTIL_CONSTANTS_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698