Chromium Code Reviews| 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_SESSION_USER_SESSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "chrome/browser/chromeos/base/locale_util.h" | 16 #include "chrome/browser/chromeos/base/locale_util.h" |
| 17 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" | |
| 17 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" | 18 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" |
| 18 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" | 19 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" |
| 19 #include "chromeos/dbus/session_manager_client.h" | 20 #include "chromeos/dbus/session_manager_client.h" |
| 20 #include "chromeos/login/auth/authenticator.h" | 21 #include "chromeos/login/auth/authenticator.h" |
| 21 #include "chromeos/login/auth/user_context.h" | 22 #include "chromeos/login/auth/user_context.h" |
| 22 #include "components/user_manager/user.h" | 23 #include "components/user_manager/user.h" |
| 23 #include "components/user_manager/user_manager.h" | 24 #include "components/user_manager/user_manager.h" |
| 24 #include "net/base/network_change_notifier.h" | 25 #include "net/base/network_change_notifier.h" |
| 25 #include "ui/base/ime/chromeos/input_method_manager.h" | 26 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 26 | 27 |
| 27 class GURL; | 28 class GURL; |
| 28 class PrefRegistrySimple; | 29 class PrefRegistrySimple; |
| 29 class PrefService; | 30 class PrefService; |
| 30 class Profile; | 31 class Profile; |
| 31 class TokenHandleFetcher; | 32 class TokenHandleFetcher; |
| 32 | 33 |
| 33 namespace net { | 34 namespace net { |
| 34 class URLRequestContextGetter; | 35 class URLRequestContextGetter; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace user_manager { | 38 namespace user_manager { |
| 38 class User; | 39 class User; |
| 39 } // namespace user_manager | 40 } // namespace user_manager |
| 40 | 41 |
| 41 namespace chromeos { | 42 namespace chromeos { |
| 42 | 43 |
| 44 namespace first_run { | |
| 45 class GoodiesDisplayer; | |
| 46 } // namespace first_run | |
| 47 | |
| 43 namespace test { | 48 namespace test { |
| 44 class UserSessionManagerTestApi; | 49 class UserSessionManagerTestApi; |
| 45 } // namespace test | 50 } // namespace test |
| 46 | 51 |
| 47 class EasyUnlockKeyManager; | 52 class EasyUnlockKeyManager; |
| 48 class InputEventsBlocker; | 53 class InputEventsBlocker; |
| 49 class LoginDisplayHost; | 54 class LoginDisplayHost; |
| 50 | 55 |
| 51 class UserSessionManagerDelegate { | 56 class UserSessionManagerDelegate { |
| 52 public: | 57 public: |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 72 // UserSessionManager is responsible for starting user session which includes: | 77 // UserSessionManager is responsible for starting user session which includes: |
| 73 // * load and initialize Profile (including custom Profile preferences), | 78 // * load and initialize Profile (including custom Profile preferences), |
| 74 // * mark user as logged in and notify observers, | 79 // * mark user as logged in and notify observers, |
| 75 // * initialize OAuth2 authentication session, | 80 // * initialize OAuth2 authentication session, |
| 76 // * initialize and launch user session based on the user type. | 81 // * initialize and launch user session based on the user type. |
| 77 // Also supports restoring active user sessions after browser crash: | 82 // Also supports restoring active user sessions after browser crash: |
| 78 // load profile, restore OAuth authentication session etc. | 83 // load profile, restore OAuth authentication session etc. |
| 79 class UserSessionManager | 84 class UserSessionManager |
| 80 : public OAuth2LoginManager::Observer, | 85 : public OAuth2LoginManager::Observer, |
| 81 public net::NetworkChangeNotifier::ConnectionTypeObserver, | 86 public net::NetworkChangeNotifier::ConnectionTypeObserver, |
| 87 public first_run::GoodiesDisplayer::Delegate, | |
|
achuithb
2015/09/18 16:39:11
You cannot inherit from an implementation class. T
Greg Levin
2015/09/18 18:49:27
Done... moved functionality into member
scoped_ptr
| |
| 82 public base::SupportsWeakPtr<UserSessionManager>, | 88 public base::SupportsWeakPtr<UserSessionManager>, |
| 83 public UserSessionManagerDelegate, | 89 public UserSessionManagerDelegate, |
| 84 public user_manager::UserManager::UserSessionStateObserver { | 90 public user_manager::UserManager::UserSessionStateObserver { |
| 85 public: | 91 public: |
| 86 // Context of StartSession calls. | 92 // Context of StartSession calls. |
| 87 typedef enum { | 93 typedef enum { |
| 88 // Starting primary user session, through login UI. | 94 // Starting primary user session, through login UI. |
| 89 PRIMARY_USER_SESSION, | 95 PRIMARY_USER_SESSION, |
| 90 | 96 |
| 91 // Starting secondary user session, through multi-profiles login UI. | 97 // Starting secondary user session, through multi-profiles login UI. |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 bool waiting_for_child_account_status_; | 482 bool waiting_for_child_account_status_; |
| 477 | 483 |
| 478 base::WeakPtrFactory<UserSessionManager> weak_factory_; | 484 base::WeakPtrFactory<UserSessionManager> weak_factory_; |
| 479 | 485 |
| 480 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); | 486 DISALLOW_COPY_AND_ASSIGN(UserSessionManager); |
| 481 }; | 487 }; |
| 482 | 488 |
| 483 } // namespace chromeos | 489 } // namespace chromeos |
| 484 | 490 |
| 485 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ | 491 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_H_ |
| OLD | NEW |