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

Unified Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: win Created 5 years, 1 month 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: extensions/browser/api/web_request/web_request_api.cc
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 33616986882c26ad23ae7afcf88338c3875cb35b..7b20d5fd66c53477a85d76217cb8472b4e04b968 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -414,8 +414,8 @@ events::HistogramValue GetEventHistogramValue(const std::string& event_name) {
{events::WEB_REQUEST_ON_AUTH_REQUIRED, keys::kOnAuthRequiredEvent},
{events::WEB_REQUEST_ON_RESPONSE_STARTED, keys::kOnResponseStartedEvent},
{events::WEB_REQUEST_ON_HEADERS_RECEIVED, keys::kOnHeadersReceivedEvent}};
- COMPILE_ASSERT(arraysize(kWebRequestEvents) == arraysize(values_and_names),
- "kWebRequestEvents and values_and_names must be the same");
+ static_assert(arraysize(kWebRequestEvents) == arraysize(values_and_names),
+ "kWebRequestEvents and values_and_names must be the same");
for (const ValueAndName& value_and_name : values_and_names) {
if (value_and_name.event_name == event_name)
return value_and_name.histogram_value;

Powered by Google App Engine
This is Rietveld 408576698