| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CROS_LOGIN_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // readable unique identifier by which we distinguish users (to deal with | 25 // readable unique identifier by which we distinguish users (to deal with |
| 26 // potential email address changes over time). | 26 // potential email address changes over time). |
| 27 virtual bool StartSession(const std::string& user_email, | 27 virtual bool StartSession(const std::string& user_email, |
| 28 const std::string& unique_id /* unused */) = 0; | 28 const std::string& unique_id /* unused */) = 0; |
| 29 | 29 |
| 30 // Tells the session manager to terminate the current logged-in session. | 30 // Tells the session manager to terminate the current logged-in session. |
| 31 // In the event that we ever support multiple simultaneous user sessions, | 31 // In the event that we ever support multiple simultaneous user sessions, |
| 32 // This will tell the session manager to terminate the session for the user | 32 // This will tell the session manager to terminate the session for the user |
| 33 // indicated by |unique_id|. | 33 // indicated by |unique_id|. |
| 34 virtual bool StopSession(const std::string& unique_id /* unused */) = 0; | 34 virtual bool StopSession(const std::string& unique_id /* unused */) = 0; |
| 35 }; | |
| 36 | 35 |
| 37 // This class handles the interaction with the ChromeOS login library APIs. | 36 // Get library implementation. |
| 38 class LoginLibraryImpl : public LoginLibrary { | 37 static LoginLibrary* GetImpl(bool stub); |
| 39 public: | |
| 40 LoginLibraryImpl() {} | |
| 41 virtual ~LoginLibraryImpl() {} | |
| 42 | |
| 43 // LoginLibrary overrides. | |
| 44 virtual bool EmitLoginPromptReady(); | |
| 45 virtual bool StartSession(const std::string& user_email, | |
| 46 const std::string& unique_id /* unused */); | |
| 47 virtual bool StopSession(const std::string& unique_id /* unused */); | |
| 48 | |
| 49 private: | |
| 50 DISALLOW_COPY_AND_ASSIGN(LoginLibraryImpl); | |
| 51 }; | 38 }; |
| 52 | 39 |
| 53 } // namespace chromeos | 40 } // namespace chromeos |
| 54 | 41 |
| 55 #endif // CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ |
| OLD | NEW |