OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "apps/app_lifetime_monitor.h" | 10 #include "apps/app_lifetime_monitor.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 base::TaskRunner* task_runner); | 31 base::TaskRunner* task_runner); |
32 ~ShortLivedUserContext() override; | 32 ~ShortLivedUserContext() override; |
33 | 33 |
34 // The UserContext returned here can be NULL if its time-to-live has expired. | 34 // The UserContext returned here can be NULL if its time-to-live has expired. |
35 UserContext* user_context() { return user_context_.get(); } | 35 UserContext* user_context() { return user_context_.get(); } |
36 | 36 |
37 private: | 37 private: |
38 void Reset(); | 38 void Reset(); |
39 | 39 |
40 // apps::AppLifetimeMonitor::Observer: | 40 // apps::AppLifetimeMonitor::Observer: |
41 void OnAppDeactivated(Profile* profile, const std::string& app_id) override; | 41 void OnAppDeactivated(content::BrowserContext* context, |
| 42 const std::string& app_id) override; |
42 | 43 |
43 std::unique_ptr<UserContext> user_context_; | 44 std::unique_ptr<UserContext> user_context_; |
44 | 45 |
45 apps::AppLifetimeMonitor* app_lifetime_monitor_; | 46 apps::AppLifetimeMonitor* app_lifetime_monitor_; |
46 | 47 |
47 base::WeakPtrFactory<ShortLivedUserContext> weak_ptr_factory_; | 48 base::WeakPtrFactory<ShortLivedUserContext> weak_ptr_factory_; |
48 | 49 |
49 DISALLOW_COPY_AND_ASSIGN(ShortLivedUserContext); | 50 DISALLOW_COPY_AND_ASSIGN(ShortLivedUserContext); |
50 }; | 51 }; |
51 | 52 |
52 } // namespace chromeos | 53 } // namespace chromeos |
53 | 54 |
54 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_SHORT_LIVED_USER_CONTEXT_H_ |
OLD | NEW |