| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_APP_MODE_KIOSK_PROFILE_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_PROFILE_LOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_PROFILE_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_PROFILE_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual void OnProfileLoadFailed(KioskAppLaunchError::Error error) = 0; | 30 virtual void OnProfileLoadFailed(KioskAppLaunchError::Error error) = 0; |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 virtual ~Delegate() {} | 33 virtual ~Delegate() {} |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 KioskProfileLoader(const std::string& app_user_id, | 36 KioskProfileLoader(const std::string& app_user_id, |
| 37 bool use_guest_mount, | 37 bool use_guest_mount, |
| 38 Delegate* delegate); | 38 Delegate* delegate); |
| 39 | 39 |
| 40 virtual ~KioskProfileLoader(); | 40 ~KioskProfileLoader() override; |
| 41 | 41 |
| 42 // Starts profile load. Calls delegate on success or failure. | 42 // Starts profile load. Calls delegate on success or failure. |
| 43 void Start(); | 43 void Start(); |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 class CryptohomedChecker; | 46 class CryptohomedChecker; |
| 47 | 47 |
| 48 void LoginAsKioskAccount(); | 48 void LoginAsKioskAccount(); |
| 49 void ReportLaunchResult(KioskAppLaunchError::Error error); | 49 void ReportLaunchResult(KioskAppLaunchError::Error error); |
| 50 | 50 |
| 51 // LoginPerformer::Delegate overrides | 51 // LoginPerformer::Delegate overrides: |
| 52 virtual void OnAuthSuccess(const UserContext& user_context) override; | 52 void OnAuthSuccess(const UserContext& user_context) override; |
| 53 virtual void OnAuthFailure(const AuthFailure& error) override; | 53 void OnAuthFailure(const AuthFailure& error) override; |
| 54 virtual void WhiteListCheckFailed(const std::string& email) override; | 54 void WhiteListCheckFailed(const std::string& email) override; |
| 55 virtual void PolicyLoadFailed() override; | 55 void PolicyLoadFailed() override; |
| 56 virtual void OnOnlineChecked( | 56 void OnOnlineChecked(const std::string& email, bool success) override; |
| 57 const std::string& email, bool success) override; | |
| 58 | 57 |
| 59 // LoginUtils::Delegate implementation: | 58 // LoginUtils::Delegate implementation: |
| 60 virtual void OnProfilePrepared(Profile* profile, | 59 void OnProfilePrepared(Profile* profile, bool browser_launched) override; |
| 61 bool browser_launched) override; | |
| 62 | 60 |
| 63 std::string user_id_; | 61 std::string user_id_; |
| 64 bool use_guest_mount_; | 62 bool use_guest_mount_; |
| 65 Delegate* delegate_; | 63 Delegate* delegate_; |
| 66 scoped_ptr<CryptohomedChecker> cryptohomed_checker_; | 64 scoped_ptr<CryptohomedChecker> cryptohomed_checker_; |
| 67 scoped_ptr<LoginPerformer> login_performer_; | 65 scoped_ptr<LoginPerformer> login_performer_; |
| 68 | 66 |
| 69 DISALLOW_COPY_AND_ASSIGN(KioskProfileLoader); | 67 DISALLOW_COPY_AND_ASSIGN(KioskProfileLoader); |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 } // namespace chromeos | 70 } // namespace chromeos |
| 73 | 71 |
| 74 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_PROFILE_LOADER_H_ | 72 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_PROFILE_LOADER_H_ |
| OLD | NEW |