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

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

Issue 2249913003: Remove blink::Resource::Type::LinkPrefetch and replace it by a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 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 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 5
6 #ifndef LinkFetchResource_h 6 #ifndef LinkFetchResource_h
7 #define LinkFetchResource_h 7 #define LinkFetchResource_h
8 8
9 #include "core/fetch/Resource.h" 9 #include "core/fetch/Resource.h"
10 #include "core/fetch/ResourceClient.h" 10 #include "core/fetch/ResourceClient.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class FetchRequest; 14 class FetchRequest;
15 class ResourceFetcher; 15 class ResourceFetcher;
16 16
17 class LinkFetchResource final : public Resource { 17 class LinkFetchResource final : public Resource {
18 public: 18 public:
19 using ClientType = ResourceClient; 19 using ClientType = ResourceClient;
20 20
21 static Resource* fetch(Resource::Type, FetchRequest&, ResourceFetcher*); 21 static Resource* fetch(Resource::Type, FetchRequest&, ResourceFetcher*);
22 ~LinkFetchResource() override; 22 ~LinkFetchResource() override;
23 bool isPrefetch() const override;
23 24
24 private: 25 private:
25 class LinkResourceFactory : public ResourceFactory { 26 class LinkResourceFactory : public ResourceFactory {
26 public: 27 public:
27 LinkResourceFactory(Resource::Type type) 28 LinkResourceFactory(Resource::Type type)
28 : ResourceFactory(type) { } 29 : ResourceFactory(type) { }
29 30
30 Resource* create(const ResourceRequest& request, const ResourceLoaderOpt ions& options, const String& charset) const override 31 Resource* create(const ResourceRequest& request, const ResourceLoaderOpt ions& options, const String& charset) const override
31 { 32 {
32 return new LinkFetchResource(request, type(), options); 33 return new LinkFetchResource(request, type(), options);
33 } 34 }
34 }; 35 };
35 LinkFetchResource(const ResourceRequest&, Type, const ResourceLoaderOptions& ); 36 LinkFetchResource(const ResourceRequest&, Type, const ResourceLoaderOptions& );
36 }; 37 };
37 38
38 } // namespace blink 39 } // namespace blink
39 40
40 #endif // LinkFetchResource_h 41 #endif // LinkFetchResource_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchRequest.cpp ('k') | third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698