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

Unified Diff: content/browser/loader/navigation_url_loader_network_service.h

Issue 2854723002: Network service: avoid requesting a new URLLoaderFactory for each NavigationURLLoaderNetworkService. (Closed)
Patch Set: . 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: content/browser/loader/navigation_url_loader_network_service.h
diff --git a/content/browser/loader/navigation_url_loader_network_service.h b/content/browser/loader/navigation_url_loader_network_service.h
index f284a5723361b8680a69419f4cf2af2395122e2f..432a9f9b5b328658e117f9f5331e4bb4fe10c8c9 100644
--- a/content/browser/loader/navigation_url_loader_network_service.h
+++ b/content/browser/loader/navigation_url_loader_network_service.h
@@ -40,7 +40,8 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader,
NavigationURLLoaderDelegate* delegate);
~NavigationURLLoaderNetworkService() override;
- // Overrides the URLLoaderFactory for the next request.
+ // Overrides the URLLoaderFactory for subsequent requests. Passing a null
+ // pointer will restore the default behavior.
static CONTENT_EXPORT void OverrideURLLoaderFactoryForTesting(
mojom::URLLoaderFactoryPtr url_loader_factory);
@@ -72,9 +73,10 @@ class NavigationURLLoaderNetworkService : public NavigationURLLoader,
void ConnectURLLoaderFactory(
std::unique_ptr<service_manager::Connector> connector);
+ mojom::URLLoaderFactory* GetURLLoaderFactory();
+
NavigationURLLoaderDelegate* delegate_;
- mojom::URLLoaderFactoryPtr url_loader_factory_;
mojo::Binding<mojom::URLLoaderClient> binding_;
mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_;
scoped_refptr<ResourceResponse> response_;

Powered by Google App Engine
This is Rietveld 408576698