1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h"
7 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
8 #include "chrome/browser/chromeos/profiles/profile_helper.h"
12 ScopedTestUserManager::ScopedTestUserManager() {
13 chrome_user_manager_
= ChromeUserManagerImpl::CreateChromeUserManager();
14 chrome_user_manager_
->Initialize();
16 // ProfileHelper has to be initialized after UserManager instance is created.
17 ProfileHelper::Get()->Initialize();
20 ScopedTestUserManager::~ScopedTestUserManager() {
21 user_manager::UserManager::Get()->Shutdown();
22 chrome_user_manager_
->Destroy();
23 chrome_user_manager_
.reset();
26 } // namespace chromeos