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

Side by Side Diff: third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.h

Issue 2831033002: Use unique_ptr for Platform::CreateURLLoader (Closed)
Patch Set: Created 3 years, 8 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 FetchTestingPlatformSupport_h 5 #ifndef FetchTestingPlatformSupport_h
6 #define FetchTestingPlatformSupport_h 6 #define FetchTestingPlatformSupport_h
7 7
8 #include <memory> 8 #include <memory>
9 #include "platform/heap/Persistent.h" 9 #include "platform/heap/Persistent.h"
10 #include "platform/testing/TestingPlatformSupport.h" 10 #include "platform/testing/TestingPlatformSupport.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class MockFetchContext; 14 class MockFetchContext;
15 15
16 class FetchTestingPlatformSupport 16 class FetchTestingPlatformSupport
17 : public TestingPlatformSupportWithMockScheduler { 17 : public TestingPlatformSupportWithMockScheduler {
18 public: 18 public:
19 FetchTestingPlatformSupport(); 19 FetchTestingPlatformSupport();
20 ~FetchTestingPlatformSupport() override; 20 ~FetchTestingPlatformSupport() override;
21 21
22 MockFetchContext* Context(); 22 MockFetchContext* Context();
23 23
24 // Platform: 24 // Platform:
25 WebURLError CancelledError(const WebURL&) const override; 25 WebURLError CancelledError(const WebURL&) const override;
26 WebURLLoaderMockFactory* GetURLLoaderMockFactory() override; 26 WebURLLoaderMockFactory* GetURLLoaderMockFactory() override;
27 WebURLLoader* CreateURLLoader() override; 27 std::unique_ptr<WebURLLoader> CreateURLLoader() override;
28 28
29 private: 29 private:
30 class FetchTestingWebURLLoaderMockFactory; 30 class FetchTestingWebURLLoaderMockFactory;
31 31
32 Persistent<MockFetchContext> context_; 32 Persistent<MockFetchContext> context_;
33 std::unique_ptr<WebURLLoaderMockFactory> url_loader_mock_factory_; 33 std::unique_ptr<WebURLLoaderMockFactory> url_loader_mock_factory_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(FetchTestingPlatformSupport); 35 DISALLOW_COPY_AND_ASSIGN(FetchTestingPlatformSupport);
36 }; 36 };
37 37
38 } // namespace blink 38 } // namespace blink
39 39
40 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698