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

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

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 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION_TH ROTTLE_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION_TH ROTTLE_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION_TH ROTTLE_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION_TH ROTTLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_list.h" 10 #include "base/callback_list.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 // Returns a new throttle for the given navigation handle, or nullptr if no 23 // Returns a new throttle for the given navigation handle, or nullptr if no
24 // throttling is required. 24 // throttling is required.
25 static std::unique_ptr<SupervisedUserGoogleAuthNavigationThrottle> 25 static std::unique_ptr<SupervisedUserGoogleAuthNavigationThrottle>
26 MaybeCreate(content::NavigationHandle* navigation_handle); 26 MaybeCreate(content::NavigationHandle* navigation_handle);
27 27
28 ~SupervisedUserGoogleAuthNavigationThrottle() override; 28 ~SupervisedUserGoogleAuthNavigationThrottle() override;
29 29
30 ThrottleCheckResult WillStartRequest() override; 30 ThrottleCheckResult WillStartRequest() override;
31 ThrottleCheckResult WillRedirectRequest() override; 31 ThrottleCheckResult WillRedirectRequest() override;
32 const char* GetNameForLogging() override;
32 33
33 private: 34 private:
34 SupervisedUserGoogleAuthNavigationThrottle( 35 SupervisedUserGoogleAuthNavigationThrottle(
35 Profile* profile, 36 Profile* profile,
36 content::NavigationHandle* navigation_handle); 37 content::NavigationHandle* navigation_handle);
37 38
38 void OnGoogleAuthStateChanged(bool authenticated); 39 void OnGoogleAuthStateChanged(bool authenticated);
39 40
40 ThrottleCheckResult WillStartOrRedirectRequest(); 41 ThrottleCheckResult WillStartOrRedirectRequest();
41 42
42 ThrottleCheckResult ShouldProceed(bool authenticated); 43 ThrottleCheckResult ShouldProceed(bool authenticated);
43 44
44 void OnReauthenticationResult(bool reauth_successful); 45 void OnReauthenticationResult(bool reauth_successful);
45 46
46 ChildAccountService* child_account_service_; 47 ChildAccountService* child_account_service_;
47 std::unique_ptr<base::CallbackList<void(bool)>::Subscription> 48 std::unique_ptr<base::CallbackList<void(bool)>::Subscription>
48 google_auth_state_subscription_; 49 google_auth_state_subscription_;
49 50
50 #if defined(OS_ANDROID) 51 #if defined(OS_ANDROID)
51 bool has_shown_reauth_; 52 bool has_shown_reauth_;
52 #endif 53 #endif
53 54
54 base::WeakPtrFactory<SupervisedUserGoogleAuthNavigationThrottle> 55 base::WeakPtrFactory<SupervisedUserGoogleAuthNavigationThrottle>
55 weak_ptr_factory_; 56 weak_ptr_factory_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(SupervisedUserGoogleAuthNavigationThrottle); 58 DISALLOW_COPY_AND_ASSIGN(SupervisedUserGoogleAuthNavigationThrottle);
58 }; 59 };
59 60
60 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION _THROTTLE_H_ 61 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_GOOGLE_AUTH_NAVIGATION _THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698