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

Unified Diff: net/url_request/url_request.cc

Issue 2837313002: Add UMA to track the number of live URLRequests. (Closed)
Patch Set: use mutable Created 3 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 | « net/log/net_log_util.cc ('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 ec9d001524607a6e4e2b33942da181f7a80fde67..bcddd10563394e9534dd525f888915c05b734352 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -186,8 +186,7 @@ URLRequest::~URLRequest() {
// on UserData associated with |this| and poke at it during teardown.
job_.reset();
- DCHECK_EQ(1u, context_->url_requests()->count(this));
- context_->url_requests()->erase(this);
+ context_->RemoveURLRequest(this);
int net_error = OK;
// Log error only on failure, not cancellation, as even successful requests
@@ -585,7 +584,7 @@ URLRequest::URLRequest(const GURL& url,
// Sanity check out environment.
DCHECK(base::ThreadTaskRunnerHandle::IsSet());
- context->url_requests()->insert(this);
+ context->InsertURLRequest(this);
net_log_.BeginEvent(
NetLogEventType::REQUEST_ALIVE,
base::Bind(&NetLogURLRequestConstructorCallback, &url, priority_));
« no previous file with comments | « net/log/net_log_util.cc ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698