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

Unified Diff: net/url_request/url_request_context.h

Issue 2837313002: Add UMA to track the number of live URLRequests. (Closed)
Patch Set: temp 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
Index: net/url_request/url_request_context.h
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index d34c2fdb3bb59c3396b32c99f8e990ce219f6b6f..8c7031018195ae10c74d9a71c0f2b161096dc974 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -225,6 +225,10 @@ class NET_EXPORT URLRequestContext
return url_requests_.get();
}
+ void InsertURLRequest(const URLRequest* request);
+
+ void RemoveURLRequest(const URLRequest* request);
+
// CHECKs that no URLRequests using this context remain. Subclasses should
// additionally call AssertNoURLRequests() within their own destructor,
// prior to implicit destruction of subclass-owned state.
@@ -325,6 +329,10 @@ class NET_EXPORT URLRequestContext
// to be unique.
const char* name_;
+ // The largest number of outstanding URLRequests that have been created by
+ // |this| and are not yet destroyed. This doesn't need to be in CopyFrom.
+ size_t largest_outstanding_requests_count_seen_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
};

Powered by Google App Engine
This is Rietveld 408576698