| 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 CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual void RestartEntd() OVERRIDE; | 32 virtual void RestartEntd() OVERRIDE; |
| 33 virtual void StartSession(const std::string& user_email) OVERRIDE; | 33 virtual void StartSession(const std::string& user_email) OVERRIDE; |
| 34 virtual void StopSession() OVERRIDE; | 34 virtual void StopSession() OVERRIDE; |
| 35 virtual void StartDeviceWipe() OVERRIDE; | 35 virtual void StartDeviceWipe() OVERRIDE; |
| 36 virtual void RequestLockScreen() OVERRIDE; | 36 virtual void RequestLockScreen() OVERRIDE; |
| 37 virtual void NotifyLockScreenShown() OVERRIDE; | 37 virtual void NotifyLockScreenShown() OVERRIDE; |
| 38 virtual void RequestUnlockScreen() OVERRIDE; | 38 virtual void RequestUnlockScreen() OVERRIDE; |
| 39 virtual void NotifyLockScreenDismissed() OVERRIDE; | 39 virtual void NotifyLockScreenDismissed() OVERRIDE; |
| 40 virtual void RetrieveDevicePolicy( | 40 virtual void RetrieveDevicePolicy( |
| 41 const RetrievePolicyCallback& callback) OVERRIDE; | 41 const RetrievePolicyCallback& callback) OVERRIDE; |
| 42 virtual void RetrieveUserPolicy( | 42 virtual void RetrievePolicyForUser( |
| 43 const std::string& username, |
| 43 const RetrievePolicyCallback& callback) OVERRIDE; | 44 const RetrievePolicyCallback& callback) OVERRIDE; |
| 44 virtual void RetrieveDeviceLocalAccountPolicy( | 45 virtual void RetrieveDeviceLocalAccountPolicy( |
| 45 const std::string& account_id, | 46 const std::string& account_id, |
| 46 const RetrievePolicyCallback& callback) OVERRIDE; | 47 const RetrievePolicyCallback& callback) OVERRIDE; |
| 47 virtual void StoreDevicePolicy(const std::string& policy_blob, | 48 virtual void StoreDevicePolicy(const std::string& policy_blob, |
| 48 const StorePolicyCallback& callback) OVERRIDE; | 49 const StorePolicyCallback& callback) OVERRIDE; |
| 49 virtual void StoreUserPolicy(const std::string& policy_blob, | 50 virtual void StorePolicyForUser(const std::string& username, |
| 50 const StorePolicyCallback& callback) OVERRIDE; | 51 const std::string& policy_blob, |
| 52 const std::string& policy_key, |
| 53 const StorePolicyCallback& callback) OVERRIDE; |
| 51 virtual void StoreDeviceLocalAccountPolicy( | 54 virtual void StoreDeviceLocalAccountPolicy( |
| 52 const std::string& account_id, | 55 const std::string& account_id, |
| 53 const std::string& policy_blob, | 56 const std::string& policy_blob, |
| 54 const StorePolicyCallback& callback) OVERRIDE; | 57 const StorePolicyCallback& callback) OVERRIDE; |
| 55 | 58 |
| 56 const std::string& device_policy() const; | 59 const std::string& device_policy() const; |
| 57 void set_device_policy(const std::string& policy_blob); | 60 void set_device_policy(const std::string& policy_blob); |
| 58 | 61 |
| 59 const std::string& user_policy() const; | 62 const std::string& user_policy(const std::string& username) const; |
| 60 void set_user_policy(const std::string& policy_blob); | 63 void set_user_policy(const std::string& username, |
| 64 const std::string& policy_blob); |
| 61 | 65 |
| 62 const std::string& device_local_account_policy( | 66 const std::string& device_local_account_policy( |
| 63 const std::string& account_id) const; | 67 const std::string& account_id) const; |
| 64 void set_device_local_account_policy(const std::string& account_id, | 68 void set_device_local_account_policy(const std::string& account_id, |
| 65 const std::string& policy_blob); | 69 const std::string& policy_blob); |
| 66 | 70 |
| 67 // Notify observers about a property change completion. | 71 // Notify observers about a property change completion. |
| 68 void OnPropertyChangeComplete(bool success); | 72 void OnPropertyChangeComplete(bool success); |
| 69 | 73 |
| 70 // Returns how many times EmitLoginPromptReady() is called. | 74 // Returns how many times EmitLoginPromptReady() is called. |
| 71 int emit_login_prompt_ready_call_count() { | 75 int emit_login_prompt_ready_call_count() { |
| 72 return emit_login_prompt_ready_call_count_; | 76 return emit_login_prompt_ready_call_count_; |
| 73 } | 77 } |
| 74 | 78 |
| 75 // Returns how many times LockScreenShown() was called. | 79 // Returns how many times LockScreenShown() was called. |
| 76 int notify_lock_screen_shown_call_count() { | 80 int notify_lock_screen_shown_call_count() { |
| 77 return notify_lock_screen_shown_call_count_; | 81 return notify_lock_screen_shown_call_count_; |
| 78 } | 82 } |
| 79 | 83 |
| 80 // Returns how many times LockScreenDismissed() was called. | 84 // Returns how many times LockScreenDismissed() was called. |
| 81 int notify_lock_screen_dismissed_call_count() { | 85 int notify_lock_screen_dismissed_call_count() { |
| 82 return notify_lock_screen_dismissed_call_count_; | 86 return notify_lock_screen_dismissed_call_count_; |
| 83 } | 87 } |
| 84 | 88 |
| 85 private: | 89 private: |
| 86 std::string device_policy_; | 90 std::string device_policy_; |
| 87 std::string user_policy_; | 91 std::map<std::string, std::string> user_policies_; |
| 88 std::map<std::string, std::string> device_local_account_policy_; | 92 std::map<std::string, std::string> device_local_account_policy_; |
| 89 ObserverList<Observer> observers_; | 93 ObserverList<Observer> observers_; |
| 90 | 94 |
| 91 int emit_login_prompt_ready_call_count_; | 95 int emit_login_prompt_ready_call_count_; |
| 92 int notify_lock_screen_shown_call_count_; | 96 int notify_lock_screen_shown_call_count_; |
| 93 int notify_lock_screen_dismissed_call_count_; | 97 int notify_lock_screen_dismissed_call_count_; |
| 94 | 98 |
| 95 DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); | 99 DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); |
| 96 }; | 100 }; |
| 97 | 101 |
| 98 } // namespace chromeos | 102 } // namespace chromeos |
| 99 | 103 |
| 100 #endif // CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ | 104 #endif // CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ |
| OLD | NEW |