Commit ab033ca0 authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

Improve ShouldAllowRequest comment

Expand comment to explain what happens with conflicting PolicyDecisions.

Bug: None
Change-Id: Id5c39ea0824cf1bf279644851addae3cc12e119a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164688
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762510}
parent 996ca777
......@@ -98,8 +98,14 @@ class WebStatePolicyDecider {
virtual ~WebStatePolicyDecider();
// Asks the decider whether the navigation corresponding to |request| should
// be allowed to continue. Defaults to true if not overriden.
// be allowed to continue. The first policy decider returning a PolicyDecision
// where ShouldCancelNavigation() is true will be the PolicyDecision used for
// the navigation. This means that a policy decider may not be called and have
// its expected decision performed for a given navigation. As such, the
// highest priority policy deciders should be added first to ensure those
// decisions are prioritized.
// Called before WebStateObserver::DidStartNavigation.
// Defaults to PolicyDecision::Allow() if not overridden.
// Never called in the following cases:
// - same-document back-forward and state change navigations
virtual PolicyDecision ShouldAllowRequest(NSURLRequest* request,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment