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

Unified Diff: ios/net/request_tracker.h

Issue 2630763002: Revert of Remove support for GlobalNetworkClientFactory from RequestTracker. (Closed)
Patch Set: Created 3 years, 11 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 | « ios/net/crn_http_protocol_handler.mm ('k') | ios/net/request_tracker.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/net/request_tracker.h
diff --git a/ios/net/request_tracker.h b/ios/net/request_tracker.h
index 13c0d11ab32a523e2f27084a852caccb9fbc0ef2..1260b15669e611fcf0850c984077a8a18cf86894 100644
--- a/ios/net/request_tracker.h
+++ b/ios/net/request_tracker.h
@@ -79,6 +79,14 @@
// this tracker.
void AddNetworkClientFactory(CRNForwardingNetworkClientFactory* factory);
+ // Registers a factory with the class that will be added to all trackers.
+ // Requests without associated trackers can add clients from these factories
+ // using GlobalClientsHandlingAnyRequest().
+ // Only |-clientHandlingAnyRequest| will be called on |factory|, the other
+ // methods are not supported.
+ static void AddGlobalNetworkClientFactory(
+ CRNForwardingNetworkClientFactory* factory);
+
// Gets the request context associated with the tracker.
virtual URLRequestContext* GetRequestContext() = 0;
@@ -87,6 +95,10 @@
// to the CRNForwardingNetworkClientFactories added to the tracker. The array
// may be empty. The caller is responsible for taking ownership of the clients
// in the array.
+
+ // Static method that returns clients that can handle any request, for use
+ // in cases where a request isn't associated with any request_tracker.
+ static NSArray* GlobalClientsHandlingAnyRequest();
// Returns clients that can handle any request.
NSArray* ClientsHandlingAnyRequest();
« no previous file with comments | « ios/net/crn_http_protocol_handler.mm ('k') | ios/net/request_tracker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698