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

Side by Side 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: Format changes 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_SUBRESOURCE_URL_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_SUBRESOURCE_URL_FACTORY_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_SUBRESOURCE_URL_FACTORY_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_SUBRESOURCE_URL_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/public/common/url_loader_factory.mojom.h" 10 #include "content/public/common/url_loader_factory.mojom.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const ResourceRequest& request, 52 const ResourceRequest& request,
53 SyncLoadCallback callback) override; 53 SyncLoadCallback callback) override;
54 54
55 private: 55 private:
56 AppCacheSubresourceURLFactory(mojom::URLLoaderFactoryRequest request, 56 AppCacheSubresourceURLFactory(mojom::URLLoaderFactoryRequest request,
57 URLLoaderFactoryGetter* factory_getter, 57 URLLoaderFactoryGetter* factory_getter,
58 base::WeakPtr<AppCacheHost> host); 58 base::WeakPtr<AppCacheHost> host);
59 59
60 void OnConnectionError(); 60 void OnConnectionError();
61 61
62 // Notifies the |client| if there is a failure. The |error_code| contains the
63 // actual error.
64 void NotifyError(mojom::URLLoaderClientPtr client, int error_code);
65
62 // Mojo binding. 66 // Mojo binding.
63 mojo::Binding<mojom::URLLoaderFactory> binding_; 67 mojo::Binding<mojom::URLLoaderFactory> binding_;
64 68
65 // Used to retrieve the network service factory to pass unhandled requests to 69 // Used to retrieve the network service factory to pass unhandled requests to
66 // the network service. 70 // the network service.
67 scoped_refptr<URLLoaderFactoryGetter> default_url_loader_factory_getter_; 71 scoped_refptr<URLLoaderFactoryGetter> default_url_loader_factory_getter_;
68 72
69 base::WeakPtr<AppCacheHost> appcache_host_; 73 base::WeakPtr<AppCacheHost> appcache_host_;
70 74
71 DISALLOW_COPY_AND_ASSIGN(AppCacheSubresourceURLFactory); 75 DISALLOW_COPY_AND_ASSIGN(AppCacheSubresourceURLFactory);
72 }; 76 };
73 77
74 } // namespace content 78 } // namespace content
75 79
76 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_FACTORY_H_ 80 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698