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

Issue 2935293002: HttpStreamFactoryImpl::Job cleanup. (Closed)

Created:
3 years, 6 months ago by Bence
Modified:
3 years, 6 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

HttpStreamFactoryImpl::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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -221 lines) Patch
M net/http/http_stream_factory_impl_job.h View 1 9 chunks +44 lines, -45 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 1 20 chunks +76 lines, -111 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.h View 2 chunks +4 lines, -2 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.cc View 6 chunks +13 lines, -13 lines 0 comments Download
M net/http/http_stream_factory_test_util.h View 3 chunks +3 lines, -15 lines 0 comments Download
M net/http/http_stream_factory_test_util.cc View 5 chunks +9 lines, -35 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
Bence
xunjieli: PTAL. Thank you. https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (left): https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.cc#oldcode809 net/http/http_stream_factory_impl_job.cc:809: using_spdy_ = false; This is ...
3 years, 6 months ago (2017-06-14 17:29:10 UTC) #6
xunjieli
wow This is a great change. Can't LGTM enough! https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.h File net/http/http_stream_factory_impl_job.h (right): https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.h#newcode161 net/http/http_stream_factory_impl_job.h:161: ...
3 years, 6 months ago (2017-06-14 18:28:01 UTC) #7
Bence
PTAL. Thanks. https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.h File net/http/http_stream_factory_impl_job.h (right): https://codereview.chromium.org/2935293002/diff/1/net/http/http_stream_factory_impl_job.h#newcode161 net/http/http_stream_factory_impl_job.h:161: // Note that this can be overwritten ...
3 years, 6 months ago (2017-06-14 19:33:30 UTC) #9
xunjieli
lgtm. Thanks for explaining the force quic bits.
3 years, 6 months ago (2017-06-14 19:35:29 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2935293002/20001
3 years, 6 months ago (2017-06-14 19:43:49 UTC) #16
commit-bot: I haz the power
3 years, 6 months ago (2017-06-14 21:12:06 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/582da3db32c75943097dabe889b0...

Powered by Google App Engine
This is Rietveld 408576698