OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 base::EmptyString() : entry->second.policy_blob_; | 75 base::EmptyString() : entry->second.policy_blob_; |
76 } | 76 } |
77 | 77 |
78 void set_device_local_account_policy_blob(const std::string& id, | 78 void set_device_local_account_policy_blob(const std::string& id, |
79 const std::string& policy_blob) { | 79 const std::string& policy_blob) { |
80 device_local_account_policy_[id].policy_blob_ = policy_blob; | 80 device_local_account_policy_[id].policy_blob_ = policy_blob; |
81 } | 81 } |
82 | 82 |
83 // SessionManagerClient: | 83 // SessionManagerClient: |
84 void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override; | 84 void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override; |
85 std::string BlockingRetrieveDevicePolicy() override; | 85 RetrievePolicyResponseType BlockingRetrieveDevicePolicy( |
| 86 std::string* policy_out) override; |
86 void RetrieveDeviceLocalAccountPolicy( | 87 void RetrieveDeviceLocalAccountPolicy( |
87 const std::string& account_id, | 88 const std::string& account_id, |
88 const RetrievePolicyCallback& callback) override; | 89 const RetrievePolicyCallback& callback) override; |
89 std::string BlockingRetrieveDeviceLocalAccountPolicy( | 90 RetrievePolicyResponseType BlockingRetrieveDeviceLocalAccountPolicy( |
90 const std::string& account_id) override; | 91 const std::string& account_id, |
| 92 std::string* policy_out) override; |
91 void StoreDevicePolicy(const std::string& policy_blob, | 93 void StoreDevicePolicy(const std::string& policy_blob, |
92 const StorePolicyCallback& callback) override; | 94 const StorePolicyCallback& callback) override; |
93 void StoreDeviceLocalAccountPolicy( | 95 void StoreDeviceLocalAccountPolicy( |
94 const std::string& account_id, | 96 const std::string& account_id, |
95 const std::string& policy_blob, | 97 const std::string& policy_blob, |
96 const StorePolicyCallback& callback) override; | 98 const StorePolicyCallback& callback) override; |
97 | 99 |
98 private: | 100 private: |
99 struct PolicyState { | 101 struct PolicyState { |
100 bool store_result_; | 102 bool store_result_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 168 |
167 std::unique_ptr<DBusThreadManagerSetter> dbus_setter_; | 169 std::unique_ptr<DBusThreadManagerSetter> dbus_setter_; |
168 | 170 |
169 private: | 171 private: |
170 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); | 172 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); |
171 }; | 173 }; |
172 | 174 |
173 } // namespace chromeos | 175 } // namespace chromeos |
174 | 176 |
175 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ |
OLD | NEW |