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

Unified Diff: content/network/url_loader_impl.h

Issue 2951293002: NetworkService: Destroy URLLoaders when a NetworkContext is destroyed. (Closed)
Patch Set: Response to comment, change why destruction is safe Created 3 years, 6 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 | « content/network/network_context.cc ('k') | content/network/url_loader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/network/url_loader_impl.h
diff --git a/content/network/url_loader_impl.h b/content/network/url_loader_impl.h
index a73b05ada3c5354579b65818ba9c736c4a6932e9..b23f2f6db50faead73b2fa545ee004f6efc5ef5a 100644
--- a/content/network/url_loader_impl.h
+++ b/content/network/url_loader_impl.h
@@ -48,6 +48,9 @@ class CONTENT_EXPORT URLLoaderImpl : public mojom::URLLoader,
void OnResponseStarted(net::URLRequest* url_request, int net_error) override;
void OnReadCompleted(net::URLRequest* url_request, int bytes_read) override;
+ // Returns a WeakPtr so tests can validate that the object was destroyed.
+ base::WeakPtr<URLLoaderImpl> GetWeakPtrForTests();
+
private:
void ReadMore();
void DidRead(uint32_t num_bytes, bool completed_synchronously);
« no previous file with comments | « content/network/network_context.cc ('k') | content/network/url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698