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

Issue 1540463003: Change the interface of GetAlternativeServicesFor, always return the best Alt-Svc entry. (Closed)

Created:
5 years ago by Zhongyi Shi
Modified:
4 years, 11 months ago
Reviewers:
Bence, mef, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, ramant (doing other things)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the interface of GetAlternativeServicesFor to GetAlternativeService, always return the best Alt-Svc entry from a list BUG=570098 Committed: https://crrev.com/32569c6744b9dc3589fb67f9e25857ba138ed76d Cr-Commit-Position: refs/heads/master@{#368258}

Patch Set 1 #

Patch Set 2 : Query quic_stream_factory to select preferred alt svc #

Total comments: 11

Patch Set 3 : Early return in GetAlternativeServiceFor #

Patch Set 4 : Chang init of server, original_url from DoStart to Cxtor #

Total comments: 8

Patch Set 5 : #

Total comments: 5

Patch Set 6 : update testcases #

Total comments: 3

Patch Set 7 : append alt_svc in response header, change interface of ConstructResponse/RequestHeaderPacket with o… #

Patch Set 8 : change port #

Patch Set 9 : saved full interface #

Patch Set 10 : add a new testcase: use first exisiting quic session when multiple are available #

Total comments: 12

Patch Set 11 : rebase, add tests w/ valid/invalid certs #

Patch Set 12 : adding comments #

Total comments: 4

Patch Set 13 : updating some comments #

Patch Set 14 : change hanging_data_ to vector #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+661 lines, -91 lines) Patch
M net/http/http_stream_factory_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M net/http/http_stream_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +55 lines, -26 lines 1 comment Download
M net/http/http_stream_factory_impl_job.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +9 lines, -9 lines 0 comments Download
M net/http/http_stream_factory_impl_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M net/quic/quic_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +430 lines, -22 lines 0 comments Download
M net/quic/quic_stream_factory.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M net/quic/quic_stream_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -1 line 0 comments Download
M net/quic/test_tools/quic_test_packet_maker.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +34 lines, -4 lines 0 comments Download
M net/quic/test_tools/quic_test_packet_maker.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +98 lines, -19 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Zhongyi Shi
Unit tests will be online tomorrow. Commments are not polished up yet. Just send this ...
5 years ago (2015-12-18 01:50:53 UTC) #2
Ryan Hamilton
Nice! I had forgotten about the need to call CanPool on the existing session. Thanks ...
5 years ago (2015-12-18 17:52:51 UTC) #4
Zhongyi Shi
https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc#newcode245 net/http/http_stream_factory_impl.cc:245: preferred_alternative_service = alternative_service; On 2015/12/18 17:52:51, Ryan Hamilton wrote: ...
5 years ago (2015-12-18 17:57:23 UTC) #5
Ryan Hamilton
https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc#newcode245 net/http/http_stream_factory_impl.cc:245: preferred_alternative_service = alternative_service; On 2015/12/18 17:57:23, Zhongyi Shi wrote: ...
5 years ago (2015-12-18 19:52:59 UTC) #6
Zhongyi Shi
On 2015/12/18 19:52:59, Ryan Hamilton wrote: > https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc > File net/http/http_stream_factory_impl.cc (right): > > https://codereview.chromium.org/1540463003/diff/20001/net/http/http_stream_factory_impl.cc#newcode245 ...
5 years ago (2015-12-18 20:32:15 UTC) #7
Zhongyi Shi
Thanks for the feedbacks. Changed two methods with early return. Also move the initialization of ...
5 years ago (2015-12-18 21:59:30 UTC) #9
Ryan Hamilton
Looking good. Almost there. https://codereview.chromium.org/1540463003/diff/70001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/1540463003/diff/70001/net/http/http_stream_factory_impl.cc#newcode94 net/http/http_stream_factory_impl.cc:94: GURL original_url = ApplyHostMappingRules(request_info.url, &server); ...
5 years ago (2015-12-18 22:56:29 UTC) #10
Zhongyi Shi
Thanks for the long discussions on where to filter the best Alt-Svc from the list. ...
5 years ago (2015-12-19 01:23:02 UTC) #12
Ryan Hamilton
Ok, I think this looks good. Now it just needs tests... https://codereview.chromium.org/1540463003/diff/130001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): ...
5 years ago (2015-12-21 17:37:52 UTC) #13
Zhongyi Shi
Updated old test cases to testing whether we are using the most promising alternative service. ...
4 years, 12 months ago (2015-12-28 22:43:22 UTC) #15
Zhongyi Shi
Change the quic_test_packet_maker to enable offset tracking in MakeRequest/ResponseHeaderPacket.
4 years, 11 months ago (2015-12-29 17:15:36 UTC) #16
Zhongyi Shi
Aha, finally got the new testcase working with a lot of generalized helper methods in ...
4 years, 11 months ago (2015-12-30 00:27:45 UTC) #18
Ryan Hamilton
Great progress! https://codereview.chromium.org/1540463003/diff/170001/net/quic/quic_network_transaction_unittest.cc File net/quic/quic_network_transaction_unittest.cc (right): https://codereview.chromium.org/1540463003/diff/170001/net/quic/quic_network_transaction_unittest.cc#newcode823 net/quic/quic_network_transaction_unittest.cc:823: // Open a session to mail.example.org:443 using ...
4 years, 11 months ago (2015-12-30 21:51:42 UTC) #19
Zhongyi Shi
Add two more test cases as suggested after the "AlwaysExpectCert" patch is landed. PTAL, thanks ...
4 years, 11 months ago (2016-01-05 22:54:20 UTC) #22
Ryan Hamilton
Looking good. just minor comments. https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc File net/quic/quic_network_transaction_unittest.cc (right): https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc#newcode544 net/quic/quic_network_transaction_unittest.cc:544: StaticSocketDataProvider* hanging_data = new ...
4 years, 11 months ago (2016-01-05 23:51:59 UTC) #23
Zhongyi Shi
https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc File net/quic/quic_network_transaction_unittest.cc (right): https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc#newcode544 net/quic/quic_network_transaction_unittest.cc:544: StaticSocketDataProvider* hanging_data = new StaticSocketDataProvider(); On 2016/01/05 23:51:58, Ryan ...
4 years, 11 months ago (2016-01-06 02:31:40 UTC) #24
Ryan Hamilton
https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc File net/quic/quic_network_transaction_unittest.cc (right): https://codereview.chromium.org/1540463003/diff/250001/net/quic/quic_network_transaction_unittest.cc#newcode544 net/quic/quic_network_transaction_unittest.cc:544: StaticSocketDataProvider* hanging_data = new StaticSocketDataProvider(); On 2016/01/06 02:31:40, Zhongyi ...
4 years, 11 months ago (2016-01-06 17:06:23 UTC) #25
Zhongyi Shi
> That's true, but you can do > > std::vector<scoped_ptr<StaticSocketDataProvider>> hanging_data_; > > and then ...
4 years, 11 months ago (2016-01-06 19:42:06 UTC) #26
Ryan Hamilton
LGTM!
4 years, 11 months ago (2016-01-08 00:19:08 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1540463003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1540463003/360001
4 years, 11 months ago (2016-01-08 00:57:41 UTC) #29
commit-bot: I haz the power
Committed patchset #14 (id:360001)
4 years, 11 months ago (2016-01-08 02:54:39 UTC) #31
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/32569c6744b9dc3589fb67f9e25857ba138ed76d Cr-Commit-Position: refs/heads/master@{#368258}
4 years, 11 months ago (2016-01-08 02:56:09 UTC) #33
mef
4 years, 11 months ago (2016-01-08 16:03:10 UTC) #35
Message was sent while issue was closed.
https://codereview.chromium.org/1540463003/diff/360001/net/http/http_stream_f...
File net/http/http_stream_factory_impl.cc (right):

https://codereview.chromium.org/1540463003/diff/360001/net/http/http_stream_f...
net/http/http_stream_factory_impl.cc:133: if (alternative_service.protocol !=
UNINITIALIZED_ALTERNATE_PROTOCOL) {
Should this code be also applied to
HttpStreamFactoryImpl::RequestBidirectionalStreamJob above?

Powered by Google App Engine
This is Rietveld 408576698