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

Unified Diff: net/http/http_response_headers.h

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge error Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_request_headers_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.h
===================================================================
--- net/http/http_response_headers.h (revision 141317)
+++ 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;
@@ -244,6 +245,18 @@
// Returns true if the response is chunk-encoded.
bool IsChunkEncoded() const;
+ // Creates a Value for use with the NetLog containing the response headers.
+ base::Value* NetLogCallback(NetLog::LogLevel log_level) const;
+
+ // Takes in a Value created by the above function, and attempts to create a
+ // copy of the original headers. Returns true on success. On failure,
+ // clears |http_response_headers|.
+ // TODO(mmenke): Long term, we want to remove this, and migrate external
+ // consumers to be NetworkDelegates.
+ static bool FromNetLogParam(
+ const base::Value* event_param,
+ scoped_refptr<HttpResponseHeaders>* http_response_headers);
+
// 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.
« no previous file with comments | « net/http/http_request_headers_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698