DescriptionHttpStreamFactoryImpl::Job cleanup.
Introduce const member |expect_spdy_| instead of IsSpdyAlternative().
Make |using_quic_| member const and use instead of IsQuicAlternative().
Const members make reasoning about Job easier.
Remove |alternative_service_| private member from Job. Process
alternative_protocol argument in Job constructor to initialize
|expect_spdy_| and |using_quic_|. Save alternative service in a
JobController private member for the purposes of marking it broken on
failure.
Consolidate HttpStreamFactoryImpl::Job constructors. Since there are
factory methods for creating this class, it makes more sense to only
have one constructor, and fill in the default NextProto and ProxyServer
arguments in the factory methods. Same with
MockHttpStreamFactoryImplJob constructors.
Make ShouldForceQuic() and GetSpdySessionKey() static, call
ShouldForceQuic() in initializer list, allowing |using_quic_| to be a
const member. Calling a non-static method from the initializer list
makes me nervous, since it is not clear at the call site which members
have to be already initialized for the method to work correctly.
Passing them explicitly to a static method makes such dependencies
transparent.
BUG=475060
Review-Url: https://codereview.chromium.org/2935293002
Cr-Commit-Position: refs/heads/master@{#479506}
Committed: https://chromium.googlesource.com/chromium/src/+/582da3db32c75943097dabe889b0fe9c680cecaa
Patch Set 1 #
Total comments: 9
Patch Set 2 : Re: #7. #
Messages
Total messages: 19 (13 generated)
|