OLD | NEW |
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 #include "content/browser/loader/navigation_url_loader_network_service.h" | 5 #include "content/browser/loader/navigation_url_loader_network_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
11 #include "content/browser/appcache/appcache_navigation_handle.h" | 11 #include "content/browser/appcache/appcache_navigation_handle.h" |
12 #include "content/browser/appcache/appcache_request_handler.h" | 12 #include "content/browser/appcache/appcache_request_handler.h" |
13 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 13 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
14 #include "content/browser/frame_host/frame_tree_node.h" | 14 #include "content/browser/frame_host/frame_tree_node.h" |
15 #include "content/browser/frame_host/navigation_request_info.h" | 15 #include "content/browser/frame_host/navigation_request_info.h" |
16 #include "content/browser/loader/navigation_resource_handler.h" | 16 #include "content/browser/loader/navigation_resource_handler.h" |
17 #include "content/browser/loader/navigation_resource_throttle.h" | 17 #include "content/browser/loader/navigation_resource_throttle.h" |
18 #include "content/browser/loader/navigation_url_loader_delegate.h" | 18 #include "content/browser/loader/navigation_url_loader_delegate.h" |
19 #include "content/browser/loader/url_loader_request_handler.h" | 19 #include "content/browser/loader/url_loader_request_handler.h" |
20 #include "content/browser/resource_context_impl.h" | 20 #include "content/browser/resource_context_impl.h" |
21 #include "content/browser/service_worker/service_worker_navigation_handle.h" | 21 #include "content/browser/service_worker/service_worker_navigation_handle.h" |
22 #include "content/browser/service_worker/service_worker_navigation_handle_core.h
" | 22 #include "content/browser/service_worker/service_worker_navigation_handle_core.h
" |
23 #include "content/browser/service_worker/service_worker_request_handler.h" | 23 #include "content/browser/service_worker/service_worker_request_handler.h" |
24 #include "content/browser/storage_partition_impl.h" | 24 #include "content/browser/storage_partition_impl.h" |
25 #include "content/browser/url_loader_factory_getter.h" | 25 #include "content/browser/url_loader_factory_getter.h" |
26 #include "content/browser/web_contents/web_contents_impl.h" | 26 #include "content/browser/web_contents/web_contents_impl.h" |
27 #include "content/browser/webui/url_data_manager_backend.h" | 27 #include "content/browser/webui/url_data_manager_backend.h" |
28 #include "content/browser/webui/web_ui_url_loader_factory.h" | 28 #include "content/browser/webui/web_ui_url_loader_factory.h" |
29 #include "content/common/throttling_url_loader.h" | 29 #include "content/common/throttling_url_loader.h" |
30 #include "content/common/url_loader_factory.mojom.h" | |
31 #include "content/public/browser/browser_context.h" | 30 #include "content/public/browser/browser_context.h" |
32 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/content_browser_client.h" | 32 #include "content/public/browser/content_browser_client.h" |
34 #include "content/public/browser/global_request_id.h" | 33 #include "content/public/browser/global_request_id.h" |
35 #include "content/public/browser/navigation_data.h" | 34 #include "content/public/browser/navigation_data.h" |
36 #include "content/public/browser/navigation_ui_data.h" | 35 #include "content/public/browser/navigation_ui_data.h" |
37 #include "content/public/browser/ssl_status.h" | 36 #include "content/public/browser/ssl_status.h" |
38 #include "content/public/browser/stream_handle.h" | 37 #include "content/public/browser/stream_handle.h" |
39 #include "content/public/common/referrer.h" | 38 #include "content/public/common/referrer.h" |
40 #include "content/public/common/url_constants.h" | 39 #include "content/public/common/url_constants.h" |
| 40 #include "content/public/common/url_loader_factory.mojom.h" |
41 #include "net/base/load_flags.h" | 41 #include "net/base/load_flags.h" |
42 #include "net/traffic_annotation/network_traffic_annotation.h" | 42 #include "net/traffic_annotation/network_traffic_annotation.h" |
43 #include "net/url_request/url_request_context.h" | 43 #include "net/url_request/url_request_context.h" |
44 #include "services/service_manager/public/cpp/connector.h" | 44 #include "services/service_manager/public/cpp/connector.h" |
45 | 45 |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 // Request ID for browser initiated requests. We start at -2 on the same lines | 50 // Request ID for browser initiated requests. We start at -2 on the same lines |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 TRACE_EVENT_ASYNC_END2("navigation", "Navigation timeToResponseStarted", | 454 TRACE_EVENT_ASYNC_END2("navigation", "Navigation timeToResponseStarted", |
455 this, "&NavigationURLLoaderNetworkService", this, | 455 this, "&NavigationURLLoaderNetworkService", this, |
456 "success", false); | 456 "success", false); |
457 | 457 |
458 delegate_->OnRequestFailed(completion_status.exists_in_cache, | 458 delegate_->OnRequestFailed(completion_status.exists_in_cache, |
459 completion_status.error_code); | 459 completion_status.error_code); |
460 } | 460 } |
461 } | 461 } |
462 | 462 |
463 } // namespace content | 463 } // namespace content |
OLD | NEW |