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

Side by Side Diff: Source/core/fetch/LinkFetchResource.h

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check Document::loader() before calling startPreload() Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/ImageResourceTest.cpp ('k') | Source/core/fetch/LinkFetchResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 #ifndef LinkFetchResource_h
7 #define LinkFetchResource_h
8
9 #include "core/fetch/Resource.h"
10 #include "core/fetch/ResourceClient.h"
11 #include "core/fetch/ResourcePtr.h"
12
13 namespace blink {
14
15 class FetchRequest;
16 class ResourceFetcher;
17
18 class LinkFetchResource final : public Resource {
19 public:
20 typedef ResourceClient ClientType;
21
22 static ResourcePtr<Resource> fetch(Resource::Type, FetchRequest&, ResourceFe tcher*);
23 virtual ~LinkFetchResource();
24
25 private:
26 class LinkResourceFactory : public ResourceFactory {
27 public:
28 LinkResourceFactory(Resource::Type type)
29 : ResourceFactory(type) { }
30
31 Resource* create(const ResourceRequest& request, const String& charset) const override
32 {
33 return new LinkFetchResource(request, type());
34 }
35 };
36 LinkFetchResource(const ResourceRequest&, Type);
37 };
38
39 }
40
41 #endif // LinkFetchResource_h
OLDNEW
« no previous file with comments | « Source/core/fetch/ImageResourceTest.cpp ('k') | Source/core/fetch/LinkFetchResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698