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

Unified Diff: content/browser/debugger/devtools_netlog_observer.cc

Issue 10870080: Add SPDY request headers to DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Back to CL #6 Created 8 years, 3 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 | « chrome/test/data/webui/net_internals/log_view_painter.js ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/debugger/devtools_netlog_observer.cc
===================================================================
--- content/browser/debugger/devtools_netlog_observer.cc (revision 154321)
+++ content/browser/debugger/devtools_netlog_observer.cc (working copy)
@@ -13,6 +13,7 @@
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
+#include "net/spdy/spdy_header_block.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_netlog_params.h"
#include "webkit/glue/resource_loader_bridge.h"
@@ -122,6 +123,26 @@
info->request_headers_text = request_line + request_headers.ToString();
break;
}
+ case net::NetLog::TYPE_HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS: {
+ scoped_ptr<Value> event_params(entry.ParametersToValue());
+ net::SpdyHeaderBlock request_headers;
+
+ if (!net::SpdyHeaderBlockFromNetLogParam(event_params.get(),
+ &request_headers)) {
+ NOTREACHED();
+ }
+
+ // We need to clear headers in case the same url_request is reused for
+ // several http requests (e.g. see http://crbug.com/80157).
+ info->request_headers.clear();
+
+ for (net::SpdyHeaderBlock::const_iterator it = request_headers.begin();
+ it != request_headers.end(); ++it) {
+ info->request_headers.push_back(std::make_pair(it->first, it->second));
+ }
+ info->request_headers_text = "";
+ break;
+ }
case net::NetLog::TYPE_HTTP_TRANSACTION_READ_RESPONSE_HEADERS: {
scoped_ptr<Value> event_params(entry.ParametersToValue());
« no previous file with comments | « chrome/test/data/webui/net_internals/log_view_painter.js ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698