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

Unified Diff: net/socket/websocket_transport_client_socket_pool.cc

Issue 2847073002: Use emplace_back when adding an item to WebSocket stalled requests (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/websocket_transport_client_socket_pool.cc
diff --git a/net/socket/websocket_transport_client_socket_pool.cc b/net/socket/websocket_transport_client_socket_pool.cc
index 73bf536272739c7ddb614d1c6dedb144d7047500..5493385f5f1f5f27dc8698983a12524107ce6520 100644
--- a/net/socket/websocket_transport_client_socket_pool.cc
+++ b/net/socket/websocket_transport_client_socket_pool.cc
@@ -342,10 +342,8 @@ int WebSocketTransportClientSocketPool::RequestSocket(
if (ReachedMaxSocketsLimit() &&
respect_limits == ClientSocketPool::RespectLimits::ENABLED) {
request_net_log.AddEvent(NetLogEventType::SOCKET_POOL_STALLED_MAX_SOCKETS);
- // TODO(ricea): Use emplace_back when C++11 becomes allowed.
- StalledRequest request(
- casted_params, priority, handle, callback, request_net_log);
- stalled_request_queue_.push_back(request);
+ stalled_request_queue_.emplace_back(casted_params, priority, handle,
+ callback, request_net_log);
StalledRequestQueue::iterator iterator = stalled_request_queue_.end();
--iterator;
DCHECK_EQ(handle, iterator->handle);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698