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

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

Issue 824683002: UserManager stack refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fixed. Created 5 years, 10 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
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/ownership/owner_settings_service_chromeos.h" 10 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 Flush(); 193 Flush();
194 } 194 }
195 195
196 ScopedDeviceSettingsTestHelper::~ScopedDeviceSettingsTestHelper() { 196 ScopedDeviceSettingsTestHelper::~ScopedDeviceSettingsTestHelper() {
197 Flush(); 197 Flush();
198 DeviceSettingsService::Get()->UnsetSessionManager(); 198 DeviceSettingsService::Get()->UnsetSessionManager();
199 DeviceSettingsService::Shutdown(); 199 DeviceSettingsService::Shutdown();
200 } 200 }
201 201
202 DeviceSettingsTestBase::DeviceSettingsTestBase() 202 DeviceSettingsTestBase::DeviceSettingsTestBase()
203 : user_manager_(new FakeUserManager()), 203 : user_manager_(new FakeChromeUserManager()),
204 user_manager_enabler_(user_manager_), 204 user_manager_enabler_(user_manager_),
205 owner_key_util_(new ownership::MockOwnerKeyUtil()) { 205 owner_key_util_(new ownership::MockOwnerKeyUtil()) {
206 OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting( 206 OwnerSettingsServiceChromeOSFactory::SetDeviceSettingsServiceForTesting(
207 &device_settings_service_); 207 &device_settings_service_);
208 OwnerSettingsServiceChromeOSFactory::GetInstance()->SetOwnerKeyUtilForTesting( 208 OwnerSettingsServiceChromeOSFactory::GetInstance()->SetOwnerKeyUtilForTesting(
209 owner_key_util_); 209 owner_key_util_);
210 } 210 }
211 211
212 DeviceSettingsTestBase::~DeviceSettingsTestBase() { 212 DeviceSettingsTestBase::~DeviceSettingsTestBase() {
213 base::RunLoop().RunUntilIdle(); 213 base::RunLoop().RunUntilIdle();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 const_cast<user_manager::User*>(user)); 258 const_cast<user_manager::User*>(user));
259 } 259 }
260 OwnerSettingsServiceChromeOS* service = 260 OwnerSettingsServiceChromeOS* service =
261 OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(profile_.get()); 261 OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(profile_.get());
262 CHECK(service); 262 CHECK(service);
263 if (tpm_is_ready) 263 if (tpm_is_ready)
264 service->OnTPMTokenReady(true /* token is enabled */); 264 service->OnTPMTokenReady(true /* token is enabled */);
265 } 265 }
266 266
267 } // namespace chromeos 267 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698