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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 void set_policy_blob(const std::string& policy_blob) { | 63 void set_policy_blob(const std::string& policy_blob) { |
64 device_policy_.policy_blob_ = policy_blob; | 64 device_policy_.policy_blob_ = policy_blob; |
65 } | 65 } |
66 | 66 |
67 const std::string& device_local_account_policy_blob( | 67 const std::string& device_local_account_policy_blob( |
68 const std::string& id) const { | 68 const std::string& id) const { |
69 const std::map<std::string, PolicyState>::const_iterator entry = | 69 const std::map<std::string, PolicyState>::const_iterator entry = |
70 device_local_account_policy_.find(id); | 70 device_local_account_policy_.find(id); |
71 return entry == device_local_account_policy_.end() ? | 71 return entry == device_local_account_policy_.end() ? |
72 EmptyString() : entry->second.policy_blob_; | 72 base::EmptyString() : entry->second.policy_blob_; |
73 } | 73 } |
74 | 74 |
75 void set_device_local_account_policy_blob(const std::string& id, | 75 void set_device_local_account_policy_blob(const std::string& id, |
76 const std::string& policy_blob) { | 76 const std::string& policy_blob) { |
77 device_local_account_policy_[id].policy_blob_ = policy_blob; | 77 device_local_account_policy_[id].policy_blob_ = policy_blob; |
78 } | 78 } |
79 | 79 |
80 // SessionManagerClient: | 80 // SessionManagerClient: |
81 virtual void Init(dbus::Bus* bus) OVERRIDE; | 81 virtual void Init(dbus::Bus* bus) OVERRIDE; |
82 virtual void AddObserver(Observer* observer) OVERRIDE; | 82 virtual void AddObserver(Observer* observer) OVERRIDE; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // with the global instance (DeviceSettingsService::Get()). | 180 // with the global instance (DeviceSettingsService::Get()). |
181 DeviceSettingsService device_settings_service_; | 181 DeviceSettingsService device_settings_service_; |
182 | 182 |
183 private: | 183 private: |
184 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); | 184 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); |
185 }; | 185 }; |
186 | 186 |
187 } // namespace chromeos | 187 } // namespace chromeos |
188 | 188 |
189 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ | 189 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ |
OLD | NEW |