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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/MockResource.h

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: rebase Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MockResource_h 5 #ifndef MockResource_h
6 #define MockResource_h 6 #define MockResource_h
7 7
8 #include "core/fetch/Resource.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "platform/loader/fetch/Resource.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class FetchRequest; 14 class FetchRequest;
14 class ResourceFetcher; 15 class ResourceFetcher;
15 struct ResourceLoaderOptions; 16 struct ResourceLoaderOptions;
16 17
17 // Mocked Resource sub-class for testing. MockResource class can pretend a type 18 // Mocked Resource sub-class for testing. MockResource class can pretend a type
18 // of Resource sub-class in a simple way. You should not expect anything 19 // of Resource sub-class in a simple way. You should not expect anything
19 // complicated to emulate actual sub-resources, but you may be able to use this 20 // complicated to emulate actual sub-resources, but you may be able to use this
20 // class to verify classes that consume Resource sub-classes in a simple way. 21 // class to verify classes that consume Resource sub-classes in a simple way.
21 class MockResource final : public Resource { 22 class PLATFORM_EXPORT MockResource final : public Resource {
22 public: 23 public:
23 static MockResource* fetch(FetchRequest&, ResourceFetcher*); 24 static MockResource* fetch(FetchRequest&, ResourceFetcher*);
24 static MockResource* create(const ResourceRequest&); 25 static MockResource* create(const ResourceRequest&);
25 MockResource(const ResourceRequest&, const ResourceLoaderOptions&); 26 MockResource(const ResourceRequest&, const ResourceLoaderOptions&);
26 }; 27 };
27 28
28 } // namespace blink 29 } // namespace blink
29 30
30 #endif 31 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698