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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_process_host.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/messaging/native_message_process_host.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
index c28b233dea7333b39a2e885cab378926a1657e05..5a98ed8651e79df61bf19de5454e0eab8c3a04a5 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
@@ -153,7 +153,8 @@ void NativeMessageProcessHost::OnMessage(const std::string& json) {
new net::IOBufferWithSize(json.size() + kMessageHeaderSize);
// Copy size and content of the message to the buffer.
- COMPILE_ASSERT(sizeof(uint32) == kMessageHeaderSize, incorrect_header_size);
+ static_assert(sizeof(uint32) == kMessageHeaderSize,
+ "kMessageHeaderSize is incorrect");
*reinterpret_cast<uint32*>(buffer->data()) = json.size();
memcpy(buffer->data() + kMessageHeaderSize, json.data(), json.size());
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api.cc ('k') | chrome/browser/extensions/api/proxy/proxy_api_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698