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 275c66750a3377e0bb4aa72cda6c2fa841bd08f4..853c2fbd2ff85b0f3492ef653388c133ce030fa7 100644 |
--- a/content/browser/frame_host/navigation_handle_impl.h |
+++ b/content/browser/frame_host/navigation_handle_impl.h |
@@ -346,6 +346,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
response_headers_ = response_headers; |
} |
+ void set_complete_callback_for_testing( |
+ const ThrottleChecksFinishedCallback& callback) { |
+ complete_callback_for_testing_ = callback; |
+ } |
+ |
private: |
friend class NavigationHandleImplTest; |
@@ -447,9 +452,16 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
// The mixed content context type for potential mixed content checks. |
blink::WebMixedContentContextType mixed_content_context_type_; |
- // This callback will be run when all throttle checks have been performed. |
+ // This callback will be run when all throttle checks have been performed. Be |
+ // careful about relying on it as the member may be removed as part of the |
+ // PlzNavigate refactoring. |
ThrottleChecksFinishedCallback complete_callback_; |
+ // This test-only callback will be run when all throttle checks have been |
+ // performed. |
+ // TODO(clamy): Revisit the unit test architecture when PlzNavigate ships. |
+ ThrottleChecksFinishedCallback complete_callback_for_testing_; |
+ |
// PlzNavigate |
// Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
// corresponding ServiceWorkerNetworkProvider is created in the renderer. |