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

Unified Diff: chrome/browser/extensions/api/alarms/alarms_api.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
Index: chrome/browser/extensions/api/alarms/alarms_api.cc
diff --git a/chrome/browser/extensions/api/alarms/alarms_api.cc b/chrome/browser/extensions/api/alarms/alarms_api.cc
index 9a80a49649246d1af0b4f192e232d8f0b6c2c711..9ac6ab2264fa23d8024d1172eafdcdb1081f3459 100644
--- a/chrome/browser/extensions/api/alarms/alarms_api.cc
+++ b/chrome/browser/extensions/api/alarms/alarms_api.cc
@@ -51,7 +51,8 @@ bool ValidateAlarmCreateInfo(const std::string& alarm_name,
// relative delays that are shorter than we'll honor.
if (create_info.delay_in_minutes.get()) {
if (*create_info.delay_in_minutes < kReleaseDelayMinimum) {
- COMPILE_ASSERT(kReleaseDelayMinimum == 1, update_warning_message_below);
+ static_assert(kReleaseDelayMinimum == 1,
+ "warning message must be updated");
if (Manifest::IsUnpackedLocation(extension->location()))
warnings->push_back(ErrorUtils::FormatErrorMessage(
"Alarm delay is less than minimum of 1 minutes."
@@ -67,7 +68,8 @@ bool ValidateAlarmCreateInfo(const std::string& alarm_name,
}
if (create_info.period_in_minutes.get()) {
if (*create_info.period_in_minutes < kReleaseDelayMinimum) {
- COMPILE_ASSERT(kReleaseDelayMinimum == 1, update_warning_message_below);
+ static_assert(kReleaseDelayMinimum == 1,
+ "warning message must be updated");
if (Manifest::IsUnpackedLocation(extension->location()))
warnings->push_back(ErrorUtils::FormatErrorMessage(
"Alarm period is less than minimum of 1 minutes."

Powered by Google App Engine
This is Rietveld 408576698