HttpServerProperties::SupportsRequestPriority() is misnamed for usage that probes connection sharing |
||
Issue description
Version: Top of Chromium tree (p410474)
OS: All
In HttpStreamFactoryImpl::Job::Preconnect there is the following code:
HttpServerProperties* http_server_properties =
session_->http_server_properties();
if (http_server_properties &&
http_server_properties->SupportsRequestPriority(
url::SchemeHostPort(request_info_.url))) {
num_streams_ = 1;
} else {
num_streams_ = num_streams;
}
This code is clearly using SupportsRequestPriority() as an alias for "Shares all connections to a host", which seems fragile. The name of the routine should be changed, or a new routine added with the same implementation.
(It's a nit, but it annoyed me during a code review, so is getting a bug filed. If either of you have opinions on this, please let me know--I'm happy to execute on them.)
,
Aug 29 2016
Hmmm. Good point. Clarity is good, but user interface minimality is also good, and if the two names really are equivalent, I don't feel a need to just create a synonym. I think what I'm inclined to do given your point is just update the comment on the method to indicate that supporting priorities also implies supporting multiplexing. WDYT?
,
Aug 29 2016
Oh, that seems like a good idea! +1
,
Aug 30 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c31e0606bacb84a3766bdcf75e93d044bdbe917e commit c31e0606bacb84a3766bdcf75e93d044bdbe917e Author: rdsmith <rdsmith@chromium.org> Date: Tue Aug 30 06:27:23 2016 Make clear SupportsRequestPriority() also implies connection sharing. BUG= 637407 R=rch@chromium.org Review-Url: https://codereview.chromium.org/2286373002 Cr-Commit-Position: refs/heads/master@{#415222} [modify] https://crrev.com/c31e0606bacb84a3766bdcf75e93d044bdbe917e/net/http/http_server_properties.h
,
Aug 30 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by rch@chromium.org
, Aug 12 2016