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

Unified Diff: content/browser/appcache/appcache_subresource_url_factory.h

Issue 2991443002: The Appcache subresource URL factory needs to inform the URLLoaderClient if there is a failure. (Closed)
Patch Set: Disable the test for Android Created 3 years, 5 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/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..a9ab90463bc699b7d8406b0013e9dbae165039b4 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,18 @@ 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);
+
// Mojo binding.
mojo::Binding<mojom::URLLoaderFactory> binding_;
« no previous file with comments | « content/browser/appcache/appcache_browsertest.cc ('k') | content/browser/appcache/appcache_subresource_url_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698