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

Unified Diff: extensions/common/permissions/permission_message_util.cc

Issue 859993002: Using "static_assert" in lieu of "COMPILE_ASSERT" in extensions module (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/permissions/permission_message.h ('k') | extensions/common/url_pattern.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/permissions/permission_message_util.cc
diff --git a/extensions/common/permissions/permission_message_util.cc b/extensions/common/permissions/permission_message_util.cc
index ed487f8d7c602bb7d6572e69dd877a6f94280061..2358ac49343c7c0417c671d266dbfc77c51bdbf2 100644
--- a/extensions/common/permissions/permission_message_util.cc
+++ b/extensions/common/permissions/permission_message_util.cc
@@ -86,11 +86,11 @@ PermissionMessage CreateFromHostList(const std::set<std::string>& hosts,
IDS_EXTENSION_PROMPT_WARNING_3_HOSTS_READ_ONLY),
std::make_pair(PermissionMessage::kHosts4OrMoreReadOnly,
IDS_EXTENSION_PROMPT_WARNING_HOSTS_LIST_READ_ONLY)};
- COMPILE_ASSERT(
+ static_assert(
arraysize(kReadWriteMessagesList) == arraysize(kReadOnlyMessagesList),
- message_lists_different_size);
- COMPILE_ASSERT(kNumMessages == arraysize(kReadWriteMessagesList),
- messages_array_different_size);
+ "message lists should be of different size");
+ static_assert(kNumMessages == arraysize(kReadWriteMessagesList),
+ "messages array should be of different size");
const MsgPair(&messages_list)[kNumMessages] =
properties == kReadOnly ? kReadOnlyMessagesList : kReadWriteMessagesList;
« no previous file with comments | « extensions/common/permissions/permission_message.h ('k') | extensions/common/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698