Chromium Code Reviews| Index: content/browser/loader/navigation_resource_throttle.h |
| diff --git a/content/browser/loader/navigation_resource_throttle.h b/content/browser/loader/navigation_resource_throttle.h |
| index a9685e347c700988dae5236040be4e5ade03b319..dc4656883d8e5b88730ca6212c1ccff233634b34 100644 |
| --- a/content/browser/loader/navigation_resource_throttle.h |
| +++ b/content/browser/loader/navigation_resource_throttle.h |
| @@ -8,6 +8,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| #include "content/common/content_export.h" |
| +#include "content/common/url_loader.mojom.h" |
| #include "content/public/browser/navigation_throttle.h" |
| #include "content/public/browser/resource_throttle.h" |
| #include "content/public/common/request_context_type.h" |
| @@ -24,10 +25,15 @@ class ResourceDispatcherHostDelegate; |
| // mechanism to interact with the navigation. |
| class NavigationResourceThrottle : public ResourceThrottle { |
| public: |
| + using TransferCallback = |
| + base::Callback<void(mojom::URLLoaderAssociatedRequest, |
| + mojom::URLLoaderClientAssociatedPtr)>; |
| + |
| NavigationResourceThrottle( |
| net::URLRequest* request, |
| ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate, |
| - RequestContextType request_context_type); |
| + RequestContextType request_context_type, |
| + const TransferCallback& on_transfer); |
| ~NavigationResourceThrottle() override; |
| // ResourceThrottle overrides: |
| @@ -51,13 +57,16 @@ class NavigationResourceThrottle : public ResourceThrottle { |
| // Used in transfer navigations. |
| void InitiateTransfer(); |
| - void OnTransferComplete(); |
| + void OnTransferComplete( |
| + mojom::URLLoaderAssociatedRequest mojo_request, |
|
clamy
2016/11/21 17:55:54
Should mojo_request/url_load_client be passed as c
yhirano
2016/11/22 08:12:55
These are movable-but-not-copyable types, so I thi
|
| + mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| net::URLRequest* request_; |
| ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate_; |
| RequestContextType request_context_type_; |
| bool in_cross_site_transition_; |
| NavigationThrottle::ThrottleCheckResult on_transfer_done_result_; |
| + TransferCallback on_transfer_; |
| base::WeakPtrFactory<NavigationResourceThrottle> weak_ptr_factory_; |