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

Unified Diff: content/public/browser/resource_request_details.cc

Issue 226183015: Added HTTP response code field to ResourceRequestDetails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrections after review. Created 6 years, 8 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 | « content/public/browser/resource_request_details.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/resource_request_details.cc
diff --git a/content/public/browser/resource_request_details.cc b/content/public/browser/resource_request_details.cc
index c24adebc4aa381bd023142a60fa00ddd2b38f32a..a5b91b90d05d6c02a49ebc87f0b60b6d8ee41818 100644
--- a/content/public/browser/resource_request_details.cc
+++ b/content/public/browser/resource_request_details.cc
@@ -6,6 +6,7 @@
#include "content/browser/worker_host/worker_service_impl.h"
#include "content/public/browser/resource_request_info.h"
+#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
namespace content {
@@ -25,6 +26,9 @@ ResourceRequestDetails::ResourceRequestDetails(const net::URLRequest* request,
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
resource_type = info->GetResourceType();
render_frame_id = info->GetRenderFrameID();
+ http_response_code =
+ request->response_info().headers.get() ?
+ request->response_info().headers.get()->response_code() : -1;
// If request is from the worker process on behalf of a renderer, use
// the renderer process id, since it consumes the notification response
« no previous file with comments | « content/public/browser/resource_request_details.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698