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

Unified Diff: net/socket/client_socket_handle.cc

Issue 1898133002: Add reprioritization to socket pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix glitch in ClientSocketHandle API contract. Created 3 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
Index: net/socket/client_socket_handle.cc
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index be58c7296d62c1b763888f0392edb43174f1a931..7c7132405e6bf2e07a027fb28223f04321078a25 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -31,6 +31,20 @@ ClientSocketHandle::~ClientSocketHandle() {
Reset();
}
+void ClientSocketHandle::SetPriority(RequestPriority priority) {
+ if (socket_) {
+ // The priority of the handle is no longer relevant to the socket pool;
+ // just return.
+ //
+ // TODO (rdsmith): Incorporate change in priority information into TCP
+ // params on this socket.
mmenke 2017/01/05 20:18:35 TransportSocketParams don't have a priority, no so
Randy Smith (Not in Mondays) 2017/01/13 23:05:44 Sorry, didn't mean TransportSocketParams, more TCP
+ return;
+ }
+
+ if (pool_)
mmenke 2017/01/05 20:18:35 Just destroying the socket seems to return it to t
Randy Smith (Not in Mondays) 2017/01/13 23:05:44 Believe the result of this comment was tracked at
mmenke 2017/01/17 18:56:31 That's right.
+ pool_->SetPriority(group_name_, this, priority);
mmenke 2017/01/05 20:18:35 Let me try and get a better...handle... on the li
Randy Smith (Not in Mondays) 2017/01/13 23:05:44 See last comment response :-}.
+}
+
void ClientSocketHandle::Reset() {
ResetInternal(true);
ResetErrorState();

Powered by Google App Engine
This is Rietveld 408576698