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 private: | 74 private: |
71 std::string device_policy_; | 75 std::string device_policy_; |
72 std::string user_policy_; | 76 std::map<std::string, std::string> user_policies_; |
73 std::map<std::string, std::string> device_local_account_policy_; | 77 std::map<std::string, std::string> device_local_account_policy_; |
74 ObserverList<Observer> observers_; | 78 ObserverList<Observer> observers_; |
75 | 79 |
76 DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); | 80 DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); |
77 }; | 81 }; |
78 | 82 |
79 } // namespace chromeos | 83 } // namespace chromeos |
80 | 84 |
81 #endif // CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ | 85 #endif // CHROMEOS_DBUS_FAKE_SESSION_MANAGER_CLIENT_H_ |
OLD | NEW |