| 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 "chrome/browser/supervised_user/supervised_user_google_auth_navigation_
throttle.h" | 5 #include "chrome/browser/supervised_user/supervised_user_google_auth_navigation_
throttle.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/signin_manager_factory.h" | 9 #include "chrome/browser/signin/signin_manager_factory.h" |
| 10 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 10 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 case content::NavigationThrottle::CANCEL: | 99 case content::NavigationThrottle::CANCEL: |
| 100 case content::NavigationThrottle::CANCEL_AND_IGNORE: { | 100 case content::NavigationThrottle::CANCEL_AND_IGNORE: { |
| 101 navigation_handle()->CancelDeferredNavigation(result); | 101 navigation_handle()->CancelDeferredNavigation(result); |
| 102 break; | 102 break; |
| 103 } | 103 } |
| 104 case content::NavigationThrottle::DEFER: { | 104 case content::NavigationThrottle::DEFER: { |
| 105 // Keep blocking. | 105 // Keep blocking. |
| 106 break; | 106 break; |
| 107 } | 107 } |
| 108 case content::NavigationThrottle::BLOCK_REQUEST: | 108 case content::NavigationThrottle::BLOCK_REQUEST: |
| 109 case content::NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE: |
| 109 case content::NavigationThrottle::BLOCK_RESPONSE: { | 110 case content::NavigationThrottle::BLOCK_RESPONSE: { |
| 110 NOTREACHED(); | 111 NOTREACHED(); |
| 111 } | 112 } |
| 112 } | 113 } |
| 113 } | 114 } |
| 114 | 115 |
| 115 content::NavigationThrottle::ThrottleCheckResult | 116 content::NavigationThrottle::ThrottleCheckResult |
| 116 SupervisedUserGoogleAuthNavigationThrottle::ShouldProceed(bool authenticated) { | 117 SupervisedUserGoogleAuthNavigationThrottle::ShouldProceed(bool authenticated) { |
| 117 if (authenticated) | 118 if (authenticated) |
| 118 return content::NavigationThrottle::PROCEED; | 119 return content::NavigationThrottle::PROCEED; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 145 if (reauth_successful) { | 146 if (reauth_successful) { |
| 146 // If reauthentication was not successful, wait until the cookies are | 147 // If reauthentication was not successful, wait until the cookies are |
| 147 // refreshed, which will call us back separately. | 148 // refreshed, which will call us back separately. |
| 148 return; | 149 return; |
| 149 } | 150 } |
| 150 | 151 |
| 151 // Otherwise cancel immediately. | 152 // Otherwise cancel immediately. |
| 152 navigation_handle()->CancelDeferredNavigation( | 153 navigation_handle()->CancelDeferredNavigation( |
| 153 content::NavigationThrottle::CANCEL_AND_IGNORE); | 154 content::NavigationThrottle::CANCEL_AND_IGNORE); |
| 154 } | 155 } |
| OLD | NEW |