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

Unified Diff: net/url_request/url_request.cc

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: tmp Created 4 years, 1 month 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/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 368b91ae3eff103afdb77ae5bb48c5e20bc9eeb9..43e82b394d50581f4d973a21ac0c408780080108 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -43,6 +43,10 @@
#include "url/gurl.h"
#include "url/origin.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/process_memory_dump.h"
+#include "base/strings/stringprintf.h"
+
using base::Time;
using std::string;
@@ -1213,6 +1217,18 @@ void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const {
out->clear();
}
+void URLRequest::PopulateAllocatorDump(
+ base::trace_event::MemoryAllocatorDump* dump) const {
+ std::string name =
+ base::StringPrintf("%s/url_request/%p", dump->absolute_name().c_str(), this);
+ base::trace_event::MemoryAllocatorDump* url_request_dump =
+ dump->process_memory_dump()->CreateAllocatorDump(name);
+ if (job_) {
+ DCHECK(url_request_dump);
+ //job_->PopulateAllocatorDump(url_request_dump);
+ }
+}
+
void URLRequest::set_status(URLRequestStatus status) {
DCHECK(status_.is_io_pending() || status_.is_success() ||
(!status.is_success() && !status.is_io_pending()));
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698