diff options
author | ttuttle <ttuttle@chromium.org> | 2015-05-14 18:25:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-15 01:26:28 +0000 |
commit | c0c828496a25acd34b85985b412799933a36f1ff (patch) | |
tree | 3f50228a69a335b186c4ce168302953a103f5729 /net/http/http_transaction.h | |
parent | 2cdcbca05bd40ac54bad7d42f6a13c479bad62c0 (diff) | |
download | chromium_src-c0c828496a25acd34b85985b412799933a36f1ff.zip chromium_src-c0c828496a25acd34b85985b412799933a36f1ff.tar.gz chromium_src-c0c828496a25acd34b85985b412799933a36f1ff.tar.bz2 |
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
Review URL: https://codereview.chromium.org/1072423005
Cr-Commit-Position: refs/heads/master@{#330011}
Diffstat (limited to 'net/http/http_transaction.h')
-rw-r--r-- | net/http/http_transaction.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h index 5b7ea9b..6b8ea70 100644 --- a/net/http/http_transaction.h +++ b/net/http/http_transaction.h @@ -133,8 +133,8 @@ class NET_EXPORT_PRIVATE HttpTransaction { // entire response body is to be ignored (e.g., in a redirect). virtual void DoneReading() = 0; - // Returns the response info for this transaction or NULL if the response - // info is not available. + // Returns the response info for this transaction. Must not be called until + // |Start| completes. virtual const HttpResponseInfo* GetResponseInfo() const = 0; // Returns the load state for this transaction. |