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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 case content::NavigationThrottle::CANCEL: | 95 case content::NavigationThrottle::CANCEL: |
96 case content::NavigationThrottle::CANCEL_AND_IGNORE: { | 96 case content::NavigationThrottle::CANCEL_AND_IGNORE: { |
97 navigation_handle()->CancelDeferredNavigation(result); | 97 navigation_handle()->CancelDeferredNavigation(result); |
98 break; | 98 break; |
99 } | 99 } |
100 case content::NavigationThrottle::DEFER: { | 100 case content::NavigationThrottle::DEFER: { |
101 // Keep blocking. | 101 // Keep blocking. |
102 break; | 102 break; |
103 } | 103 } |
104 case content::NavigationThrottle::BLOCK_REQUEST: | 104 case content::NavigationThrottle::BLOCK_REQUEST: |
| 105 case content::NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE: |
105 case content::NavigationThrottle::BLOCK_RESPONSE: { | 106 case content::NavigationThrottle::BLOCK_RESPONSE: { |
106 NOTREACHED(); | 107 NOTREACHED(); |
107 } | 108 } |
108 } | 109 } |
109 } | 110 } |
110 | 111 |
111 content::NavigationThrottle::ThrottleCheckResult | 112 content::NavigationThrottle::ThrottleCheckResult |
112 SupervisedUserGoogleAuthNavigationThrottle::ShouldProceed(bool authenticated) { | 113 SupervisedUserGoogleAuthNavigationThrottle::ShouldProceed(bool authenticated) { |
113 if (authenticated) | 114 if (authenticated) |
114 return content::NavigationThrottle::PROCEED; | 115 return content::NavigationThrottle::PROCEED; |
(...skipping 26 matching lines...) Expand all Loading... |
141 if (reauth_successful) { | 142 if (reauth_successful) { |
142 // If reauthentication was not successful, wait until the cookies are | 143 // If reauthentication was not successful, wait until the cookies are |
143 // refreshed, which will call us back separately. | 144 // refreshed, which will call us back separately. |
144 return; | 145 return; |
145 } | 146 } |
146 | 147 |
147 // Otherwise cancel immediately. | 148 // Otherwise cancel immediately. |
148 navigation_handle()->CancelDeferredNavigation( | 149 navigation_handle()->CancelDeferredNavigation( |
149 content::NavigationThrottle::CANCEL_AND_IGNORE); | 150 content::NavigationThrottle::CANCEL_AND_IGNORE); |
150 } | 151 } |
OLD | NEW |