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

Unified Diff: net/socket/client_socket_pool_manager.cc

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups 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 | « net/quic/port_suggester.cc ('k') | net/socket/client_socket_pool_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_manager.cc
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index 8b6c17cb5f652ab3741ba1a46667aa731f2c8588..cd3633661ff92bdcb508f9777bcda43bae08fc71 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -29,9 +29,9 @@ int g_max_sockets_per_pool[] = {
256 // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_pool) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_pool_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_pool) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per pool length mismatch");
// Default to allow up to 6 connections per host. Experiment and tuning may
// try other values (greater than 0). Too large may cause many problems, such
@@ -48,9 +48,9 @@ int g_max_sockets_per_group[] = {
30 // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_group) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_group_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_group) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per group length mismatch");
// The max number of sockets to allow per proxy server. This applies both to
// http and SOCKS proxies. See http://crbug.com/12066 and
@@ -60,9 +60,9 @@ int g_max_sockets_per_proxy_server[] = {
kDefaultMaxSocketsPerProxyServer // WEBSOCKET_SOCKET_POOL
};
-COMPILE_ASSERT(arraysize(g_max_sockets_per_proxy_server) ==
- HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
- max_sockets_per_proxy_server_length_mismatch);
+static_assert(arraysize(g_max_sockets_per_proxy_server) ==
+ HttpNetworkSession::NUM_SOCKET_POOL_TYPES,
+ "max sockets per proxy server length mismatch");
// The meat of the implementation for the InitSocketHandleForHttpRequest,
// InitSocketHandleForRawConnect and PreconnectSocketsForHttpRequest methods.
« no previous file with comments | « net/quic/port_suggester.cc ('k') | net/socket/client_socket_pool_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698