Chromium Code Reviews| Index: content/browser/appcache/appcache_subresource_url_factory.h |
| diff --git a/content/browser/appcache/appcache_subresource_url_factory.h b/content/browser/appcache/appcache_subresource_url_factory.h |
| index ef4458e8a5129e50d466a159830a27228e0261bf..40f36a9363fa5c528aa737a4128108e2c6dbf2f7 100644 |
| --- a/content/browser/appcache/appcache_subresource_url_factory.h |
| +++ b/content/browser/appcache/appcache_subresource_url_factory.h |
| @@ -7,6 +7,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "content/common/content_export.h" |
| #include "content/public/common/url_loader_factory.mojom.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| #include "net/traffic_annotation/network_traffic_annotation.h" |
| @@ -20,7 +21,8 @@ class AppCacheServiceImpl; |
| class URLLoaderFactoryGetter; |
| // Implements the URLLoaderFactory mojom for AppCache subresource requests. |
| -class AppCacheSubresourceURLFactory : public mojom::URLLoaderFactory { |
| +class CONTENT_EXPORT AppCacheSubresourceURLFactory |
| + : public mojom::URLLoaderFactory { |
| public: |
| ~AppCacheSubresourceURLFactory() override; |
| @@ -53,12 +55,23 @@ class AppCacheSubresourceURLFactory : public mojom::URLLoaderFactory { |
| SyncLoadCallback callback) override; |
| private: |
| + friend class AppCacheNetworkServiceBrowserTest; |
| + |
| AppCacheSubresourceURLFactory(mojom::URLLoaderFactoryRequest request, |
| URLLoaderFactoryGetter* factory_getter, |
| base::WeakPtr<AppCacheHost> host); |
| void OnConnectionError(); |
| + // Notifies the |client| if there is a failure. The |error_code| contains the |
| + // actual error. |
| + void NotifyError(mojom::URLLoaderClientPtr client, int error_code); |
| + |
| + // Passes a flag |for_testing| indicating that we are in test mode. Certain |
| + // behaviors like returning errors for a missing host, etc are turned off in |
|
jam
2017/07/25 15:00:51
this seems specific to this one test; it's not int
ananta
2017/07/25 22:26:49
Thanks. done. I had to create a custom embedded se
|
| + // this mode. Defaults to false. |
| + static void SetForTesting(bool for_testing); |
| + |
| // Mojo binding. |
| mojo::Binding<mojom::URLLoaderFactory> binding_; |