| Index: content/browser/loader/navigation_resource_throttle.cc
|
| diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc
|
| index a0701876314316a010f00dc4d130aab58a4515b9..cd7f4c39ba36318993b03d0d9e84391ed69b7cbb 100644
|
| --- a/content/browser/loader/navigation_resource_throttle.cc
|
| +++ b/content/browser/loader/navigation_resource_throttle.cc
|
| @@ -283,6 +283,16 @@ void NavigationResourceThrottle::OnUIChecksPerformed(
|
| controller()->Cancel();
|
| } else if (result == NavigationThrottle::BLOCK_REQUEST) {
|
| controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT);
|
| + } else if (result == NavigationThrottle::BLOCK_RESPONSE) {
|
| + // TODO(mkwst): If we cancel the main frame request with anything other than
|
| + // 'net::ERR_ABORTED', we'll trigger some special behavior that might not be
|
| + // desirable here (non-POSTs will reload the page, while POST has some logic
|
| + // around reloading to avoid duplicating actions server-side). For the
|
| + // moment, only child frame navigations should be blocked. If we need to
|
| + // block main frame navigations in the future, we'll need to carefully
|
| + // consider the right thing to do here.
|
| + DCHECK(!ResourceRequestInfo::ForRequest(request_)->IsMainFrame());
|
| + controller()->CancelWithError(net::ERR_BLOCKED_BY_RESPONSE);
|
| } else {
|
| controller()->Resume();
|
| }
|
|
|