diff options
author | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 06:50:04 +0000 |
---|---|---|
committer | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 06:50:04 +0000 |
commit | 79e1fd6eccb6f3eeab76d51722e2f9f1ca5650b4 (patch) | |
tree | 7ba0fec996fd7d2ea09ddfef6df2af4652c6b68c /net/http/http_transaction.h | |
parent | 217d824a769edd7d7dcee63669a6836a78f74a32 (diff) | |
download | chromium_src-79e1fd6eccb6f3eeab76d51722e2f9f1ca5650b4.zip chromium_src-79e1fd6eccb6f3eeab76d51722e2f9f1ca5650b4.tar.gz chromium_src-79e1fd6eccb6f3eeab76d51722e2f9f1ca5650b4.tar.bz2 |
Add GetFullRequestHeaders, from URLRequestJob to HttpNetworkTransaction.
Dev Tools displays the raw request and response headers. Right now, it gets
them by snarfing them out of the NetLog, which is bad, as the NetLog is for
huamn consumption only. I'm trying to refactor the DevToolsNetLogObserver
away; providing an alternate, supported path to get the request headers is the
first step.
BUG=196304
TEST=added to URLRequest, HttpTransaction, and HttpNetworkTransaction unittests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199535
Review URL: https://chromiumcodereview.appspot.com/12621011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207341 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_transaction.h')
-rw-r--r-- | net/http/http_transaction.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h index c23bf93..ec3fc08 100644 --- a/net/http/http_transaction.h +++ b/net/http/http_transaction.h @@ -15,6 +15,7 @@ namespace net { class AuthCredentials; class BoundNetLog; +class HttpRequestHeaders; struct HttpRequestInfo; class HttpResponseInfo; class IOBuffer; @@ -96,6 +97,14 @@ class NET_EXPORT_PRIVATE HttpTransaction { // Stops further caching of this request by the HTTP cache, if there is any. virtual void StopCaching() = 0; + // Gets the full request headers sent to the server. This is guaranteed to + // work only if Start returns success and the underlying transaction supports + // it. (Right now, this is only network transactions, not cache ones.) + // + // Returns true and overwrites headers if it can get the request headers; + // otherwise, returns false and does not modify headers. + virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; + // Called to tell the transaction that we have successfully reached the end // of the stream. This is equivalent to performing an extra Read() at the end // that should return 0 bytes. This method should not be called if the |