| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/frame_host/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/frame_host/frame_tree_node.h" | 9 #include "content/browser/frame_host/frame_tree_node.h" |
| 10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 WillRedirectRequest(new_url, new_method_is_post, new_referrer_url, | 250 WillRedirectRequest(new_url, new_method_is_post, new_referrer_url, |
| 251 new_is_external_protocol, | 251 new_is_external_protocol, |
| 252 scoped_refptr<net::HttpResponseHeaders>(), | 252 scoped_refptr<net::HttpResponseHeaders>(), |
| 253 base::Bind(&UpdateThrottleCheckResult, &result)); | 253 base::Bind(&UpdateThrottleCheckResult, &result)); |
| 254 | 254 |
| 255 // Reset the callback to ensure it will not be called later. | 255 // Reset the callback to ensure it will not be called later. |
| 256 complete_callback_.Reset(); | 256 complete_callback_.Reset(); |
| 257 return result; | 257 return result; |
| 258 } | 258 } |
| 259 | 259 |
| 260 NavigationData* NavigationHandleImpl::GetNavigationData() const { |
| 261 return navigation_data_.get(); |
| 262 } |
| 263 |
| 260 void NavigationHandleImpl::InitServiceWorkerHandle( | 264 void NavigationHandleImpl::InitServiceWorkerHandle( |
| 261 ServiceWorkerContextWrapper* service_worker_context) { | 265 ServiceWorkerContextWrapper* service_worker_context) { |
| 262 DCHECK(IsBrowserSideNavigationEnabled()); | 266 DCHECK(IsBrowserSideNavigationEnabled()); |
| 263 service_worker_handle_.reset( | 267 service_worker_handle_.reset( |
| 264 new ServiceWorkerNavigationHandle(service_worker_context)); | 268 new ServiceWorkerNavigationHandle(service_worker_context)); |
| 265 } | 269 } |
| 266 | 270 |
| 267 void NavigationHandleImpl::WillStartRequest( | 271 void NavigationHandleImpl::WillStartRequest( |
| 268 bool is_post, | 272 bool is_post, |
| 269 const Referrer& sanitized_referrer, | 273 const Referrer& sanitized_referrer, |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 complete_callback_.Reset(); | 486 complete_callback_.Reset(); |
| 483 | 487 |
| 484 if (!callback.is_null()) | 488 if (!callback.is_null()) |
| 485 callback.Run(result); | 489 callback.Run(result); |
| 486 | 490 |
| 487 // No code after running the callback, as it might have resulted in our | 491 // No code after running the callback, as it might have resulted in our |
| 488 // destruction. | 492 // destruction. |
| 489 } | 493 } |
| 490 | 494 |
| 491 } // namespace content | 495 } // namespace content |
| OLD | NEW |