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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2967363002: Refactor NavigationHandleImpl::RegisterNavigationThrottles. (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // Helper function to run and reset the |complete_callback_|. This marks the 422 // Helper function to run and reset the |complete_callback_|. This marks the
423 // end of a round of NavigationThrottleChecks. 423 // end of a round of NavigationThrottleChecks.
424 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result); 424 void RunCompleteCallback(NavigationThrottle::ThrottleCheckResult result);
425 425
426 // Used in tests. 426 // Used in tests.
427 State state() const { return state_; } 427 State state() const { return state_; }
428 428
429 // Populates |throttles_| with the throttles for this navigation. 429 // Populates |throttles_| with the throttles for this navigation.
430 void RegisterNavigationThrottles(); 430 void RegisterNavigationThrottles();
431 431
432 // Append a new NavigationThrottle (if any) to |throttle_|.
clamy 2017/07/11 12:32:37 I would rephrase this as // Takes ownership of |th
arthursonzogni 2017/07/11 14:36:35 Done.
433 void AddThrottle(std::unique_ptr<NavigationThrottle> throttle);
434
432 // Checks for attempts to navigate to a page that is already referenced more 435 // Checks for attempts to navigate to a page that is already referenced more
433 // than once in the frame's ancestors. This is a helper function used by 436 // than once in the frame's ancestors. This is a helper function used by
434 // WillStartRequest and WillRedirectRequest to prevent the navigation. 437 // WillStartRequest and WillRedirectRequest to prevent the navigation.
435 bool IsSelfReferentialURL(); 438 bool IsSelfReferentialURL();
436 439
437 // Updates the destination site URL for this navigation. This is called on 440 // Updates the destination site URL for this navigation. This is called on
438 // redirects. 441 // redirects.
439 // PlzNavigate: |post_redirect_process| is the renderer process that should 442 // PlzNavigate: |post_redirect_process| is the renderer process that should
440 // handle the navigation following the redirect if it can be handled by an 443 // handle the navigation following the redirect if it can be handled by an
441 // existing RenderProcessHost. Otherwise, it should be null. 444 // existing RenderProcessHost. Otherwise, it should be null.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 bool is_in_constructor; 595 bool is_in_constructor;
593 596
594 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 597 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
595 598
596 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 599 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
597 }; 600 };
598 601
599 } // namespace content 602 } // namespace content
600 603
601 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 604 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698