Chromium Code Reviews| Index: content/browser/frame_host/navigation_handle_impl.h |
| diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h |
| index a72e774e78dad5b6e13a1258daa021a19e521e27..6ecb84f3c4af9545e08cbe0dbdcd2023e2ac75f7 100644 |
| --- a/content/browser/frame_host/navigation_handle_impl.h |
| +++ b/content/browser/frame_host/navigation_handle_impl.h |
| @@ -112,8 +112,14 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
| return service_worker_handle_.get(); |
| } |
| - typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> |
| - ThrottleChecksFinishedCallback; |
| + using ExtraHeadersList = std::vector<std::pair<std::string, std::string> >; |
|
nasko
2015/11/25 14:54:37
nit: I think it is safe these days to have ">>" at
|
| + using ThrottleChecksFinishedCallback = |
| + base::Callback<void(NavigationThrottle::ThrottleCheckResult, |
| + const ExtraHeadersList&)>; |
| + |
| + // Adds an entry in the ExtraHeadersList. The extra header itself will be |
| + // added to the request when the ThrottleChecksFinishedCallback will be run. |
| + void AddExtraHeader(const std::string& name, const std::string& value); |
| // Called when the URLRequest will start in the network stack. |callback| |
| // will be called when all throttle checks have completed. This will allow |
| @@ -204,6 +210,10 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
| // The index of the next throttle to check. |
| size_t next_index_; |
| + // Passed back to the handler of the navigation request after the throttles |
| + // checks have been performed. |
| + ExtraHeadersList extra_headers_to_add_; |
| + |
| // This callback will be run when all throttle checks have been performed. |
| ThrottleChecksFinishedCallback complete_callback_; |