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

Unified Diff: net/url_request/url_request_context.h

Issue 10006009: Track URLRequestContext references in a set. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nits Created 8 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/url_request/url_request.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f4fb5ea49279d342c706d619fb3e0da4903293bb..1bdb772cdf4cd7997d42ce13df4ddb0f004245ad 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -11,6 +11,8 @@
#define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
#pragma once
+#include <set>
+
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -189,6 +191,12 @@ class NET_EXPORT URLRequestContext
job_factory_ = job_factory;
}
+ // Gets the URLRequest objects that hold a reference to this
+ // URLRequestContext.
+ std::set<const URLRequest*>* url_requests() const {
+ return url_requests_.get();
+ }
+
protected:
friend class base::RefCountedThreadSafe<URLRequestContext>;
@@ -232,6 +240,8 @@ class NET_EXPORT URLRequestContext
// be added to CopyFrom.
// ---------------------------------------------------------------------------
+ scoped_ptr<std::set<const URLRequest*> > url_requests_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
};
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698