Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_test_helper.cc

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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,
170 const StorePolicyCallback& callback) { 169 const StorePolicyCallback& callback) {
171 } 170 }
172 171
173 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy( 172 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy(
174 const std::string& account_id, 173 const std::string& account_id,
175 const std::string& policy_blob, 174 const std::string& policy_blob,
176 const StorePolicyCallback& callback) { 175 const StorePolicyCallback& callback) {
177 device_local_account_policy_[account_id].policy_blob_ = policy_blob; 176 device_local_account_policy_[account_id].policy_blob_ = policy_blob;
178 device_local_account_policy_[account_id].store_callbacks_.push_back(callback); 177 device_local_account_policy_[account_id].store_callbacks_.push_back(callback);
179 } 178 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void DeviceSettingsTestBase::FlushDeviceSettings() { 237 void DeviceSettingsTestBase::FlushDeviceSettings() {
239 device_settings_test_helper_.Flush(); 238 device_settings_test_helper_.Flush();
240 } 239 }
241 240
242 void DeviceSettingsTestBase::ReloadDeviceSettings() { 241 void DeviceSettingsTestBase::ReloadDeviceSettings() {
243 device_settings_service_.OwnerKeySet(true); 242 device_settings_service_.OwnerKeySet(true);
244 FlushDeviceSettings(); 243 FlushDeviceSettings();
245 } 244 }
246 245
247 } // namespace chromeos 246 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698