Dana Fried | ab22fac4 | 2024-03-29 22:34:54 | [diff] [blame] | 1 | // Copyright 2024 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_USER_EDUCATION_RECENT_SESSION_OBSERVER_H_ |
| 6 | #define CHROME_BROWSER_USER_EDUCATION_RECENT_SESSION_OBSERVER_H_ |
| 7 | |
Dana Fried | f74d7c5 | 2024-05-01 23:55:43 | [diff] [blame] | 8 | #include "base/callback_list.h" |
| 9 | #include "base/functional/callback_forward.h" |
Dana Fried | d72e10f | 2024-05-07 17:38:30 | [diff] [blame] | 10 | #include "base/gtest_prod_util.h" |
Dana Fried | ab22fac4 | 2024-03-29 22:34:54 | [diff] [blame] | 11 | #include "chrome/browser/user_education/recent_session_tracker.h" |
| 12 | |
| 13 | class RecentSessionObserver { |
| 14 | public: |
Dana Fried | f74d7c5 | 2024-05-01 23:55:43 | [diff] [blame] | 15 | RecentSessionObserver(); |
Dana Fried | ab22fac4 | 2024-03-29 22:34:54 | [diff] [blame] | 16 | RecentSessionObserver(const RecentSessionObserver&) = delete; |
| 17 | void operator=(const RecentSessionObserver&) = delete; |
Dana Fried | f74d7c5 | 2024-05-01 23:55:43 | [diff] [blame] | 18 | virtual ~RecentSessionObserver(); |
Dana Fried | ab22fac4 | 2024-03-29 22:34:54 | [diff] [blame] | 19 | |
| 20 | // Initialization once the tracker is available. |
| 21 | virtual void Init(RecentSessionTracker& tracker) = 0; |
Dana Fried | f74d7c5 | 2024-05-01 23:55:43 | [diff] [blame] | 22 | |
| 23 | // Adds a callback that will be called when a new session starts for a |
| 24 | // low-usage profile. |
| 25 | base::CallbackListSubscription AddLowUsageSessionCallback( |
| 26 | base::RepeatingClosure callback); |
| 27 | |
|
|