| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "third_party/cros/chromeos_login.h" | 12 #include "third_party/cros/chromeos_login.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 // This interface defines the interaction with the ChromeOS login library APIs. | 16 // This interface defines the interaction with the ChromeOS login library APIs. |
| 17 class LoginLibrary { | 17 class LoginLibrary { |
| 18 public: | 18 public: |
| 19 virtual ~LoginLibrary(); | 19 virtual ~LoginLibrary(); |
| 20 |
| 21 virtual void Init() = 0; |
| 22 |
| 20 // Requests that the Upstart signal login-prompt-ready be emitted. | 23 // Requests that the Upstart signal login-prompt-ready be emitted. |
| 21 virtual void EmitLoginPromptReady() = 0; | 24 virtual void EmitLoginPromptReady() = 0; |
| 22 | 25 |
| 23 virtual void RequestRetrievePolicy(RetrievePolicyCallback callback, | 26 virtual void RequestRetrievePolicy(RetrievePolicyCallback callback, |
| 24 void* delegate_string) = 0; | 27 void* delegate_string) = 0; |
| 25 | 28 |
| 26 virtual void RequestStorePolicy(const std::string& policy, | 29 virtual void RequestStorePolicy(const std::string& policy, |
| 27 StorePolicyCallback callback, | 30 StorePolicyCallback callback, |
| 28 void* delegate_bool) = 0; | 31 void* delegate_bool) = 0; |
| 29 | 32 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 47 virtual bool RestartJob(int pid, const std::string& command_line) = 0; | 50 virtual bool RestartJob(int pid, const std::string& command_line) = 0; |
| 48 | 51 |
| 49 // Factory function, creates a new instance and returns ownership. | 52 // Factory function, creates a new instance and returns ownership. |
| 50 // For normal usage, access the singleton via CrosLibrary::Get(). | 53 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 51 static LoginLibrary* GetImpl(bool stub); | 54 static LoginLibrary* GetImpl(bool stub); |
| 52 }; | 55 }; |
| 53 | 56 |
| 54 } // namespace chromeos | 57 } // namespace chromeos |
| 55 | 58 |
| 56 #endif // CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_CROS_LOGIN_LIBRARY_H_ |
| OLD | NEW |