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

Issue 1072423005: Set network_accessed earlier, when network transaction creates stream. (Closed)

Created:
5 years, 8 months ago by Deprecated (see juliatuttle)
Modified:
5 years, 7 months ago
Reviewers:
davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, horo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set network_accessed earlier, when network transaction creates stream. HttpResponseInfo contains a "network_accessed" flag that is currently set when HttpNetworkTransaction finishes sending the request. This is not entirely accurate; it ends up false for requests that don't send a request but do touch the network in other ways (e.g. DNS resolution fails, or TCP connection is terminated before we finish sending the request). This flag is used only by Domain Reliability for checking whether a request touched the network, and by ServiceWorker for histograms. horo says ServiceWorker won't be affected, and I would prefer these semantics for Domain Reliability's use, so I'm changing it. Note that this also changes several instances of GetResponseInfo to stop returning NULL. See also for context: https://groups.google.com/a/chromium.org/forum/#!topic/net-dev/Wtn65jGyot0 BUG=480565 Committed: https://crrev.com/c0c828496a25acd34b85985b412799933a36f1ff Cr-Commit-Position: refs/heads/master@{#330011}

Patch Set 1 #

Patch Set 2 : Set network_accessed in network transaction, not cache transaction #

Patch Set 3 : Also set network_accessed in URLRequest::NotifyBeforeNetworkStart #

Total comments: 1

Patch Set 4 : Don't set network_accessed while deferred; add unit tests. #

Patch Set 5 : rebase #

Patch Set 6 : Plumb network_accessed up properly through HNT and HCT; adjust tests. #

Patch Set 7 : rebase #

Total comments: 9

Patch Set 8 : Make requested changes #

Patch Set 9 : Don't break build on iOS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -62 lines) Patch
M net/http/failing_http_transaction_factory.cc View 1 2 3 4 5 6 7 4 chunks +3 lines, -3 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -6 lines 0 comments Download
M net/http/http_network_layer_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 3 chunks +3 lines, -5 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 17 chunks +1 line, -42 lines 0 comments Download
M net/http/http_transaction.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +106 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (4 generated)
Deprecated (see juliatuttle)
CCing horo; haven't chosen a reviewer yet.
5 years, 8 months ago (2015-04-24 02:48:23 UTC) #1
davidben
How hard would it be to make a test for this?
5 years, 8 months ago (2015-04-24 16:36:41 UTC) #4
Deprecated (see juliatuttle)
On 2015/04/24 16:36:41, David Benjamin (OOO sick) wrote: > How hard would it be to ...
5 years, 8 months ago (2015-04-24 17:34:02 UTC) #5
davidben
On 2015/04/24 17:34:02, ttuttle wrote: > On 2015/04/24 16:36:41, David Benjamin (OOO sick) wrote: > ...
5 years, 8 months ago (2015-04-24 17:35:57 UTC) #6
Deprecated (see juliatuttle)
On 2015/04/24 17:34:02, ttuttle wrote: > On 2015/04/24 16:36:41, David Benjamin (OOO sick) wrote: > ...
5 years, 8 months ago (2015-04-24 17:49:11 UTC) #7
Deprecated (see juliatuttle)
On 2015/04/24 17:35:57, David Benjamin (OOO sick) wrote: > On 2015/04/24 17:34:02, ttuttle wrote: > ...
5 years, 8 months ago (2015-04-24 17:50:33 UTC) #8
Deprecated (see juliatuttle)
...okay, it looks like there is a very simple way to set the right bit ...
5 years, 7 months ago (2015-04-27 18:42:20 UTC) #9
davidben
Unit test? https://codereview.chromium.org/1072423005/diff/60001/net/url_request/url_request.cc File net/url_request/url_request.cc (right): https://codereview.chromium.org/1072423005/diff/60001/net/url_request/url_request.cc#newcode771 net/url_request/url_request.cc:771: response_info_.network_accessed = true; Why does this get ...
5 years, 7 months ago (2015-05-04 17:57:19 UTC) #10
Deprecated (see juliatuttle)
On 2015/05/04 17:57:19, David Benjamin wrote: > Unit test? > > https://codereview.chromium.org/1072423005/diff/60001/net/url_request/url_request.cc > File net/url_request/url_request.cc ...
5 years, 7 months ago (2015-05-08 18:27:25 UTC) #11
Deprecated (see juliatuttle)
PTAL, davidben.
5 years, 7 months ago (2015-05-08 22:03:23 UTC) #12
davidben
On 2015/05/08 18:27:25, ttuttle wrote: > On 2015/05/04 17:57:19, David Benjamin wrote: > > Unit ...
5 years, 7 months ago (2015-05-11 19:01:56 UTC) #13
Deprecated (see juliatuttle)
PTAL, davidben.
5 years, 7 months ago (2015-05-14 00:07:34 UTC) #14
davidben
https://codereview.chromium.org/1072423005/diff/140001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/1072423005/diff/140001/net/http/http_cache_transaction.cc#newcode1083 net/http/http_cache_transaction.cc:1083: if (response) This can't ever be NULL, can it? ...
5 years, 7 months ago (2015-05-14 22:28:14 UTC) #15
Deprecated (see juliatuttle)
PTAL. https://codereview.chromium.org/1072423005/diff/140001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/1072423005/diff/140001/net/http/http_cache_transaction.cc#newcode1083 net/http/http_cache_transaction.cc:1083: if (response) On 2015/05/14 22:28:14, David Benjamin wrote: ...
5 years, 7 months ago (2015-05-14 23:52:10 UTC) #16
davidben
lgtm https://codereview.chromium.org/1072423005/diff/140001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/1072423005/diff/140001/net/url_request/url_request_unittest.cc#newcode9197 net/url_request/url_request_unittest.cc:9197: On 2015/05/14 23:52:10, ttuttle wrote: > On 2015/05/14 ...
5 years, 7 months ago (2015-05-14 23:55:04 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1072423005/180001
5 years, 7 months ago (2015-05-15 00:35:55 UTC) #20
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years, 7 months ago (2015-05-15 01:26:10 UTC) #21
commit-bot: I haz the power
5 years, 7 months ago (2015-05-15 01:27:19 UTC) #22
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c0c828496a25acd34b85985b412799933a36f1ff
Cr-Commit-Position: refs/heads/master@{#330011}

Powered by Google App Engine
This is Rietveld 408576698