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

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: message cleanup 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
« no previous file with comments | « content/renderer/pepper/pepper_websocket_host.cc ('k') | gpu/command_buffer/common/id_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d1a14dd5b5a0050d0f2b9141caf7e58f6364c880..793a68a03969823bb69c5311dc04b81cc377e491 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -413,8 +413,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;
« no previous file with comments | « content/renderer/pepper/pepper_websocket_host.cc ('k') | gpu/command_buffer/common/id_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698