summaryrefslogtreecommitdiffstats
path: root/net/http/http_transaction.h
diff options
context:
space:
mode:
authorttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-10 21:08:50 +0000
committerttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-10 21:08:50 +0000
commit396361315d2d4170c89bb9adb398807d220ace3e (patch)
tree8feefea7d93acad79b8a9a810dfdad5173bb7ee4 /net/http/http_transaction.h
parente8f3f9981fe331526bc5db64cda1e4fce73d35f3 (diff)
downloadchromium_src-396361315d2d4170c89bb9adb398807d220ace3e.zip
chromium_src-396361315d2d4170c89bb9adb398807d220ace3e.tar.gz
chromium_src-396361315d2d4170c89bb9adb398807d220ace3e.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 Review URL: https://chromiumcodereview.appspot.com/12621011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_transaction.h')
-rw-r--r--net/http/http_transaction.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h
index c162b01..38d3bd7 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