OLD | NEW |
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 #include "content/browser/loader/navigation_url_loader.h" | 5 #include "content/browser/loader/navigation_url_loader.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/frame_host/navigation_request_info.h" | 9 #include "content/browser/frame_host/navigation_request_info.h" |
10 #include "content/browser/loader/navigation_url_loader_factory.h" | 10 #include "content/browser/loader/navigation_url_loader_factory.h" |
11 #include "content/browser/loader/navigation_url_loader_impl.h" | 11 #include "content/browser/loader/navigation_url_loader_impl.h" |
12 #include "content/public/browser/navigation_ui_data.h" | 12 #include "content/public/browser/navigation_ui_data.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 static NavigationURLLoaderFactory* g_factory = nullptr; | 16 static NavigationURLLoaderFactory* g_factory = nullptr; |
17 | 17 |
18 std::unique_ptr<NavigationURLLoader> NavigationURLLoader::Create( | 18 std::unique_ptr<NavigationURLLoader> NavigationURLLoader::Create( |
19 BrowserContext* browser_context, | 19 BrowserContext* browser_context, |
20 std::unique_ptr<NavigationRequestInfo> request_info, | 20 std::unique_ptr<NavigationRequestInfo> request_info, |
21 std::unique_ptr<NavigationUIData> navigation_ui_data, | 21 std::unique_ptr<NavigationUIData> navigation_ui_data, |
22 ServiceWorkerNavigationHandle* service_worker_handle, | 22 ServiceWorkerNavigationHandle* service_worker_handle, |
| 23 AppCacheNavigationHandle* appcache_handle, |
23 NavigationURLLoaderDelegate* delegate) { | 24 NavigationURLLoaderDelegate* delegate) { |
24 if (g_factory) { | 25 if (g_factory) { |
25 return g_factory->CreateLoader(browser_context, std::move(request_info), | 26 return g_factory->CreateLoader(browser_context, std::move(request_info), |
26 std::move(navigation_ui_data), | 27 std::move(navigation_ui_data), |
27 service_worker_handle, delegate); | 28 service_worker_handle, delegate); |
28 } | 29 } |
29 return std::unique_ptr<NavigationURLLoader>(new NavigationURLLoaderImpl( | 30 return std::unique_ptr<NavigationURLLoader>(new NavigationURLLoaderImpl( |
30 browser_context, std::move(request_info), std::move(navigation_ui_data), | 31 browser_context, std::move(request_info), std::move(navigation_ui_data), |
31 service_worker_handle, delegate)); | 32 service_worker_handle, appcache_handle, delegate)); |
32 } | 33 } |
33 | 34 |
34 void NavigationURLLoader::SetFactoryForTesting( | 35 void NavigationURLLoader::SetFactoryForTesting( |
35 NavigationURLLoaderFactory* factory) { | 36 NavigationURLLoaderFactory* factory) { |
36 DCHECK(g_factory == nullptr || factory == nullptr); | 37 DCHECK(g_factory == nullptr || factory == nullptr); |
37 g_factory = factory; | 38 g_factory = factory; |
38 } | 39 } |
39 | 40 |
40 } // namespace content | 41 } // namespace content |
OLD | NEW |