Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: ... and without breaking stuff. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree_node.h » ('j') | content/browser/frame_host/frame_tree_node.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698