| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "extensions/browser/extension_navigation_throttle.h" | 5 #include "extensions/browser/extension_navigation_throttle.h" |
| 6 | 6 |
| 7 #include "components/guest_view/browser/guest_view_base.h" | 7 #include "components/guest_view/browser/guest_view_base.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/navigation_handle.h" | 9 #include "content/public/browser/navigation_handle.h" |
| 10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 content::NavigationThrottle::ThrottleCheckResult | 188 content::NavigationThrottle::ThrottleCheckResult |
| 189 ExtensionNavigationThrottle::WillStartRequest() { | 189 ExtensionNavigationThrottle::WillStartRequest() { |
| 190 return WillStartOrRedirectRequest(); | 190 return WillStartOrRedirectRequest(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 content::NavigationThrottle::ThrottleCheckResult | 193 content::NavigationThrottle::ThrottleCheckResult |
| 194 ExtensionNavigationThrottle::WillRedirectRequest() { | 194 ExtensionNavigationThrottle::WillRedirectRequest() { |
| 195 ThrottleCheckResult result = WillStartOrRedirectRequest(); | 195 ThrottleCheckResult result = WillStartOrRedirectRequest(); |
| 196 if (result == BLOCK_REQUEST) { | 196 if (result.action() == BLOCK_REQUEST) { |
| 197 // BLOCK_REQUEST is on redirect does not work without PlzNavigate, so | 197 // BLOCK_REQUEST is on redirect does not work without PlzNavigate, so |
| 198 // translate these errors into CANCEL. | 198 // translate these errors into CANCEL. |
| 199 return CANCEL; | 199 return CANCEL; |
| 200 } | 200 } |
| 201 return result; | 201 return result; |
| 202 } | 202 } |
| 203 | 203 |
| 204 const char* ExtensionNavigationThrottle::GetNameForLogging() { | 204 const char* ExtensionNavigationThrottle::GetNameForLogging() { |
| 205 return "ExtensionNavigationThrottle"; | 205 return "ExtensionNavigationThrottle"; |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace extensions | 208 } // namespace extensions |
| OLD | NEW |