OLD | NEW |
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 #include "content/browser/loader/navigation_resource_throttle.h" | 5 #include "content/browser/loader/navigation_resource_throttle.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 return "NavigationResourceThrottle"; | 252 return "NavigationResourceThrottle"; |
253 } | 253 } |
254 | 254 |
255 void NavigationResourceThrottle::OnUIChecksPerformed( | 255 void NavigationResourceThrottle::OnUIChecksPerformed( |
256 NavigationThrottle::ThrottleCheckResult result) { | 256 NavigationThrottle::ThrottleCheckResult result) { |
257 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 257 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
258 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 258 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
259 controller()->CancelAndIgnore(); | 259 controller()->CancelAndIgnore(); |
260 } else if (result == NavigationThrottle::CANCEL) { | 260 } else if (result == NavigationThrottle::CANCEL) { |
261 controller()->Cancel(); | 261 controller()->Cancel(); |
| 262 } else if (result == NavigationThrottle::BLOCK_REQUEST) { |
| 263 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT); |
262 } else { | 264 } else { |
263 controller()->Resume(); | 265 controller()->Resume(); |
264 } | 266 } |
265 } | 267 } |
266 | 268 |
267 } // namespace content | 269 } // namespace content |
OLD | NEW |