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

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: Incorporated latest round of comments. 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..7957f4388fdf84083eeb2909503fcc6074ae24f6 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -31,6 +31,17 @@ 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.
+ return;
+ }
+
+ if (pool_)
+ pool_->SetPriority(group_name_, this, priority);
+}
+
void ClientSocketHandle::Reset() {
ResetInternal(true);
ResetErrorState();

Powered by Google App Engine
This is Rietveld 408576698