diff options
Diffstat (limited to 'chromium/content/browser/url_loader_factory_getter.h')
-rw-r--r-- | chromium/content/browser/url_loader_factory_getter.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/chromium/content/browser/url_loader_factory_getter.h b/chromium/content/browser/url_loader_factory_getter.h index 2386c82bd4c..da31f8cf52e 100644 --- a/chromium/content/browser/url_loader_factory_getter.h +++ b/chromium/content/browser/url_loader_factory_getter.h @@ -31,10 +31,19 @@ class URLLoaderFactoryGetter CONTENT_EXPORT URLLoaderFactoryGetter(); // Initializes this object on the UI thread. The |partition| is used to - // initialize the URLLoaderFactories for the network service and AppCache, and - // will be cached to recover from connection error. + // initialize the URLLoaderFactories for the network service, AppCache, and + // ServiceWorkers, and will be cached to recover from connection error. + // After Initialize(), you can get URLLoaderFactories from this + // getter. However, any messages on it will be queued until + // HandleFactoryRequests() is called. void Initialize(StoragePartitionImpl* partition); + // Called on the UI thread to actually instantiate factories whose pointers + // are to be exposed by this getter. This must be called after NetworkContext + // is initialized. + // TODO(shimazu): Remove this once NetworkService is shipped. + void HandleFactoryRequests(); + // Clear the cached pointer to |StoragePartitionImpl| on the UI thread. Should // be called when the partition is going away. void OnStoragePartitionDestroyed(); @@ -58,7 +67,8 @@ class URLLoaderFactoryGetter network::mojom::URLLoaderFactoryRequest network_factory_request); // Called on the IO thread to get the URLLoaderFactory to the blob service. - // The pointer shouldn't be cached. + // Must be used only if the network service or servicified service worker is + // enabled. The pointer shouldn't be cached. CONTENT_EXPORT network::mojom::URLLoaderFactory* GetBlobFactory(); // Overrides the network URLLoaderFactory for subsequent requests. Passing a @@ -106,6 +116,10 @@ class URLLoaderFactoryGetter // Call |network_factory_.FlushForTesting()|. For test use only. void FlushNetworkInterfaceForTesting(); + // Bound with appropriate URLLoaderFactories at HandleFactoryRequests(). + network::mojom::URLLoaderFactoryRequest pending_network_factory_request_; + network::mojom::URLLoaderFactoryRequest pending_blob_factory_request_; + // Only accessed on IO thread. network::mojom::URLLoaderFactoryPtr network_factory_; network::mojom::URLLoaderFactoryPtr blob_factory_; |