Chromium Code Reviews

Side by Side Diff: content/test/test_navigation_url_loader_factory.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_ 5 #ifndef CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_
6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_ 6 #define CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/loader/navigation_url_loader_factory.h" 11 #include "content/browser/loader/navigation_url_loader_factory.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 class NavigationURLLoader; 15 class NavigationURLLoader;
15 16
16 // PlzNavigate 17 // PlzNavigate
17 // Manages creation of the NavigationURLLoaders; when registered, all created 18 // Manages creation of the NavigationURLLoaders; when registered, all created
18 // NavigationURLLoaderss will be TestNavigationURLLoaderss. This automatically 19 // NavigationURLLoaderss will be TestNavigationURLLoaderss. This automatically
19 // registers itself when it goes in scope, and unregisters itself when it goes 20 // registers itself when it goes in scope, and unregisters itself when it goes
20 // out of scope. Since you can't have more than one factory registered at a 21 // out of scope. Since you can't have more than one factory registered at a
21 // time, you can only have one of these objects at a time. 22 // time, you can only have one of these objects at a time.
22 class TestNavigationURLLoaderFactory : public NavigationURLLoaderFactory { 23 class TestNavigationURLLoaderFactory : public NavigationURLLoaderFactory {
23 public: 24 public:
24 TestNavigationURLLoaderFactory(); 25 TestNavigationURLLoaderFactory();
25 ~TestNavigationURLLoaderFactory() override; 26 ~TestNavigationURLLoaderFactory() override;
26 27
27 // TestNavigationURLLoaderFactory implementation. 28 // TestNavigationURLLoaderFactory implementation.
28 scoped_ptr<NavigationURLLoader> CreateLoader( 29 std::unique_ptr<NavigationURLLoader> CreateLoader(
29 BrowserContext* browser_context, 30 BrowserContext* browser_context,
30 scoped_ptr<NavigationRequestInfo> request_info, 31 std::unique_ptr<NavigationRequestInfo> request_info,
31 ServiceWorkerNavigationHandle* service_worker_handle, 32 ServiceWorkerNavigationHandle* service_worker_handle,
32 NavigationURLLoaderDelegate* delegate) override; 33 NavigationURLLoaderDelegate* delegate) override;
33 34
34 private: 35 private:
35 DISALLOW_COPY_AND_ASSIGN(TestNavigationURLLoaderFactory); 36 DISALLOW_COPY_AND_ASSIGN(TestNavigationURLLoaderFactory);
36 }; 37 };
37 38
38 } // namespace content 39 } // namespace content
39 40
40 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_ 41 #endif // CONTENT_TEST_TEST_NAVIGATION_URL_LOADER_FACTORY_H_
OLDNEW

Powered by Google App Engine