Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2698393002: Allow asynchronous deferral in NavigationSimulator (Closed)
Patch Set: engedy/clamy review Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698