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

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: Add comments and track the number of leaked requests. 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
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..36db3b573ea347911e253a3ac213edd9496e0579 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -11,6 +11,7 @@
#define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
#pragma once
+#include <set>
wtc 2012/04/05 21:37:16 Nit: add a blank line to separate this from Chrome
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -189,6 +190,10 @@ class NET_EXPORT URLRequestContext
job_factory_ = job_factory;
}
+ std::set<const URLRequest*>* url_requests() const {
wtc 2012/04/05 21:37:16 Please document this method. ("Gets the URLRequest
+ return url_requests_.get();
+ }
+
protected:
friend class base::RefCountedThreadSafe<URLRequestContext>;
@@ -232,6 +237,8 @@ class NET_EXPORT URLRequestContext
// be added to CopyFrom.
// ---------------------------------------------------------------------------
+ scoped_ptr<std::set<const URLRequest*> > url_requests_;
wtc 2012/04/05 21:37:16 This can be simply std::set<const URLRequest*>
willchan no longer on Chromium 2012/04/06 13:51:17 Actually it does, because URLRequest has access to
+
DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
};

Powered by Google App Engine
This is Rietveld 408576698