| 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 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 10 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void DeviceSettingsTestHelper::StoreDevicePolicy( | 159 void DeviceSettingsTestHelper::StoreDevicePolicy( |
| 160 const std::string& policy_blob, | 160 const std::string& policy_blob, |
| 161 const StorePolicyCallback& callback) { | 161 const StorePolicyCallback& callback) { |
| 162 device_policy_.policy_blob_ = policy_blob; | 162 device_policy_.policy_blob_ = policy_blob; |
| 163 device_policy_.store_callbacks_.push_back(callback); | 163 device_policy_.store_callbacks_.push_back(callback); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void DeviceSettingsTestHelper::StorePolicyForUser( | 166 void DeviceSettingsTestHelper::StorePolicyForUser( |
| 167 const std::string& username, | 167 const std::string& username, |
| 168 const std::string& policy_blob, | 168 const std::string& policy_blob, |
| 169 const std::string& policy_key, |
| 169 const StorePolicyCallback& callback) { | 170 const StorePolicyCallback& callback) { |
| 170 } | 171 } |
| 171 | 172 |
| 172 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy( | 173 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy( |
| 173 const std::string& account_id, | 174 const std::string& account_id, |
| 174 const std::string& policy_blob, | 175 const std::string& policy_blob, |
| 175 const StorePolicyCallback& callback) { | 176 const StorePolicyCallback& callback) { |
| 176 device_local_account_policy_[account_id].policy_blob_ = policy_blob; | 177 device_local_account_policy_[account_id].policy_blob_ = policy_blob; |
| 177 device_local_account_policy_[account_id].store_callbacks_.push_back(callback); | 178 device_local_account_policy_[account_id].store_callbacks_.push_back(callback); |
| 178 } | 179 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 void DeviceSettingsTestBase::FlushDeviceSettings() { | 238 void DeviceSettingsTestBase::FlushDeviceSettings() { |
| 238 device_settings_test_helper_.Flush(); | 239 device_settings_test_helper_.Flush(); |
| 239 } | 240 } |
| 240 | 241 |
| 241 void DeviceSettingsTestBase::ReloadDeviceSettings() { | 242 void DeviceSettingsTestBase::ReloadDeviceSettings() { |
| 242 device_settings_service_.OwnerKeySet(true); | 243 device_settings_service_.OwnerKeySet(true); |
| 243 FlushDeviceSettings(); | 244 FlushDeviceSettings(); |
| 244 } | 245 } |
| 245 | 246 |
| 246 } // namespace chromeos | 247 } // namespace chromeos |
| OLD | NEW |