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

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

Issue 2830353003: Tracing for NavigationHandle lifetime and state. (Closed)
Patch Set: Rebase. 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 content::NavigationThrottle::ThrottleCheckResult 50 content::NavigationThrottle::ThrottleCheckResult
51 SupervisedUserGoogleAuthNavigationThrottle::WillStartRequest() { 51 SupervisedUserGoogleAuthNavigationThrottle::WillStartRequest() {
52 return WillStartOrRedirectRequest(); 52 return WillStartOrRedirectRequest();
53 } 53 }
54 54
55 content::NavigationThrottle::ThrottleCheckResult 55 content::NavigationThrottle::ThrottleCheckResult
56 SupervisedUserGoogleAuthNavigationThrottle::WillRedirectRequest() { 56 SupervisedUserGoogleAuthNavigationThrottle::WillRedirectRequest() {
57 return WillStartOrRedirectRequest(); 57 return WillStartOrRedirectRequest();
58 } 58 }
59 59
60 const char* SupervisedUserGoogleAuthNavigationThrottle::GetNameForLogging() {
61 return "SupervisedUserGoogleAuthNavigationThrottle";
62 }
63
60 content::NavigationThrottle::ThrottleCheckResult 64 content::NavigationThrottle::ThrottleCheckResult
61 SupervisedUserGoogleAuthNavigationThrottle::WillStartOrRedirectRequest() { 65 SupervisedUserGoogleAuthNavigationThrottle::WillStartOrRedirectRequest() {
62 const GURL& url = navigation_handle()->GetURL(); 66 const GURL& url = navigation_handle()->GetURL();
63 if (!google_util::IsGoogleSearchUrl(url) && 67 if (!google_util::IsGoogleSearchUrl(url) &&
64 !google_util::IsGoogleHomePageUrl(url) && 68 !google_util::IsGoogleHomePageUrl(url) &&
65 !google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN, 69 !google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN,
66 google_util::ALLOW_NON_STANDARD_PORTS)) { 70 google_util::ALLOW_NON_STANDARD_PORTS)) {
67 return content::NavigationThrottle::PROCEED; 71 return content::NavigationThrottle::PROCEED;
68 } 72 }
69 73
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (reauth_successful) { 145 if (reauth_successful) {
142 // If reauthentication was not successful, wait until the cookies are 146 // If reauthentication was not successful, wait until the cookies are
143 // refreshed, which will call us back separately. 147 // refreshed, which will call us back separately.
144 return; 148 return;
145 } 149 }
146 150
147 // Otherwise cancel immediately. 151 // Otherwise cancel immediately.
148 navigation_handle()->CancelDeferredNavigation( 152 navigation_handle()->CancelDeferredNavigation(
149 content::NavigationThrottle::CANCEL_AND_IGNORE); 153 content::NavigationThrottle::CANCEL_AND_IGNORE);
150 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698