Chromium Code Reviews| Index: net/http/http_response_headers.h |
| =================================================================== |
| --- net/http/http_response_headers.h (revision 140753) |
| +++ net/http/http_response_headers.h (working copy) |
| @@ -13,6 +13,7 @@ |
| #include "base/hash_tables.h" |
| #include "base/memory/ref_counted.h" |
| #include "net/base/net_export.h" |
| +#include "net/base/net_log.h" |
| #include "net/http/http_version.h" |
| class Pickle; |
| @@ -21,6 +22,7 @@ |
| namespace base { |
| class Time; |
| class TimeDelta; |
| +class Value; |
| } |
| namespace net { |
| @@ -244,6 +246,17 @@ |
| // Returns true if the response is chunk-encoded. |
| bool IsChunkEncoded() const; |
| + // Returns a Value for use with the NetLog containing the response headers. |
|
eroman
2012/06/06 21:27:11
optional nit: Returns --> Creates (to imply caller
mmenke
2012/06/07 19:20:46
Done.
|
| + base::Value* NetLogCallback(NetLog::LogLevel log_level) const; |
| + |
| + // Takes in a Value created by the above function, and attempts to extract the |
| + // original response headers. Returns a duplicate of the original headers |
| + // on success. On failure, returns NULL. |
| + // TODO(mmenke): Long term, we want to remove this, and migrate external |
| + // consumers to be NetworkDelegates. |
| + static scoped_refptr<HttpResponseHeaders> FromNetLogParam( |
|
eroman
2012/06/06 21:27:11
nit: for consistency with the other converters, I
mmenke
2012/06/07 19:20:46
Done.
|
| + const base::Value* event_param); |
| + |
| // Returns the HTTP response code. This is 0 if the response code text seems |
| // to exist but could not be parsed. Otherwise, it defaults to 200 if the |
| // response code is not found in the raw headers. |