|
|
Chromium Code Reviews
DescriptionRecord Proxy Server scheme accurately
The scheme of the proxy server is current read from
proxy_info which may not match the scheme of the proxy
server actually used (e.g., when there is a race between
HTTP2 and QUIC connection). This CL fixes the bug by reading
the scheme from the proxy server set in the request (instead
of from the proxy_info).
BUG=654793
Committed: https://crrev.com/10939b0d35b8e8ac58010b67c860f2a5a53da5d3
Cr-Commit-Position: refs/heads/master@{#426346}
Patch Set 1 : ps #
Total comments: 6
Patch Set 2 : addressed comments, moved various other tests from Mock framework #
Messages
Total messages: 37 (30 generated)
Patchset #2 (id:20001) has been deleted
Patchset #1 (id:1) has been deleted
Patchset #1 (id:40001) has been deleted
Description was changed from ========== Record Proxy Server scheme accurately BUG= ========== to ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request. BUG=654793 ==========
Description was changed from ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request. BUG=654793 ========== to ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request (instead of from the proxy_info). BUG=654793 ==========
tbansal@chromium.org changed reviewers: + ryansturm@chromium.org
ryansturm: ptal. thanks
https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... File components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc (right): https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc:153: if (data_reduction_proxy_config_->WasDataReductionProxyUsed(request, Can you flip the if and early return here instead of scoping the rest of the method? https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc:167: // |proxy_info.proxy_servers|. However, currently for some of the unittests Is it a lot of work to fix those unittests? It would be more straightforward just to DCHECK this without the if and DCHECK request->proxy_server() isn't direct or invalid. Then below it would just be request->proxy_server() instead of proxy_server_used. The ternary operator below seems really strange and it makes this code pretty hard to understand. https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... File components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc (right): https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc:1100: TEST_F(DataReductionProxyBypassStatsEndToEndTest, HttpProxyScheme) { Is there a QUIC version of this test?
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #2 (id:80001) has been deleted
Patchset #2 (id:100001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:120001) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #3 (id:120002) has been deleted
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
ryansturm: ptal. I have changed the tests in data_reduction_proxy_bypass_stats_unittest.cc, so now they do not use mocking test framework. There is still one test left in data_reduction_proxy_bypass_stats_unittest.cc that uses mocking which I think can be removed because the relevant code is no longer active (field trial was turned down). https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... File components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc (right): https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc:153: if (data_reduction_proxy_config_->WasDataReductionProxyUsed(request, On 2016/10/18 21:44:57, Ryan Sturm wrote: > Can you flip the if and early return here instead of scoping the rest of the > method? Done. https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc:167: // |proxy_info.proxy_servers|. However, currently for some of the unittests On 2016/10/18 21:44:57, Ryan Sturm wrote: > Is it a lot of work to fix those unittests? It would be more straightforward > just to DCHECK this without the if and DCHECK request->proxy_server() isn't > direct or invalid. Then below it would just be request->proxy_server() instead > of proxy_server_used. Right, I did try to update tests but it seems like it is non trivial amount of work. > > The ternary operator below seems really strange and it makes this code pretty > hard to understand. Rewritten. https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... File components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc (right): https://codereview.chromium.org/2426903003/diff/60001/components/data_reducti... components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc:1100: TEST_F(DataReductionProxyBypassStatsEndToEndTest, HttpProxyScheme) { On 2016/10/18 21:44:57, Ryan Sturm wrote: > Is there a QUIC version of this test? No. I do not see a easy way to write the QUIC test which is meaningful enough. However, I added the HTTPS version of the test. Since the code only impacts recording of histogram data, it may not be worth the effort.
Patchset #2 (id:140001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm.
The CQ bit was checked by tbansal@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request (instead of from the proxy_info). BUG=654793 ========== to ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request (instead of from the proxy_info). BUG=654793 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:170001)
Message was sent while issue was closed.
Description was changed from ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request (instead of from the proxy_info). BUG=654793 ========== to ========== Record Proxy Server scheme accurately The scheme of the proxy server is current read from proxy_info which may not match the scheme of the proxy server actually used (e.g., when there is a race between HTTP2 and QUIC connection). This CL fixes the bug by reading the scheme from the proxy server set in the request (instead of from the proxy_info). BUG=654793 Committed: https://crrev.com/10939b0d35b8e8ac58010b67c860f2a5a53da5d3 Cr-Commit-Position: refs/heads/master@{#426346} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/10939b0d35b8e8ac58010b67c860f2a5a53da5d3 Cr-Commit-Position: refs/heads/master@{#426346} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
