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

Unified Diff: chrome/browser/internal_auth.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/visit_tracker.cc ('k') | chrome/browser/mac/relauncher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/internal_auth.cc
diff --git a/chrome/browser/internal_auth.cc b/chrome/browser/internal_auth.cc
index acdd4420b22eb839b27e1090a584f08761d03f72..4286011fb38810ae4f6ec16cee6d3e122f0ae4dc 100644
--- a/chrome/browser/internal_auth.cc
+++ b/chrome/browser/internal_auth.cc
@@ -37,10 +37,11 @@ const int kVerificationWindowTicks = 2000;
const int kGenerationWindowTicks = 20;
// Makes no sense to compare other way round.
-COMPILE_ASSERT(kGenerationWindowTicks <= kVerificationWindowTicks,
- makes_no_sense_to_have_generation_window_larger_than_verification_one);
+static_assert(kGenerationWindowTicks <= kVerificationWindowTicks,
+ "generation window should not be larger than the verification window");
// We are not optimized for high value of kGenerationWindowTicks.
-COMPILE_ASSERT(kGenerationWindowTicks < 30, too_large_generation_window);
+static_assert(kGenerationWindowTicks < 30,
+ "generation window should not be too large");
// Regenerate key after this number of ticks.
const int kKeyRegenerationSoftTicks = 500000;
@@ -99,8 +100,8 @@ bool IsVarSane(const std::string& var) {
"abcdefghijklmnopqrstuvwxyz"
"0123456789"
"_";
- COMPILE_ASSERT(
- sizeof(kAllowedChars) == 26 + 26 + 10 + 1 + 1, some_mess_with_chars);
+ static_assert(
+ sizeof(kAllowedChars) == 26 + 26 + 10 + 1 + 1, "some mess with chars");
// We must not allow kItemSeparator in anything used as an input to construct
// message to sign.
DCHECK(std::find(kAllowedChars, kAllowedChars + arraysize(kAllowedChars),
« no previous file with comments | « chrome/browser/history/visit_tracker.cc ('k') | chrome/browser/mac/relauncher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698