OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/login/users/user_manager.h" | 5 #include "chrome/browser/chromeos/login/users/user_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 9 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
10 #include "chrome/browser/chromeos/login/users/user_manager_impl.h" | 10 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
11 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 11 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 static UserManager* g_user_manager = NULL; | 16 static UserManager* g_user_manager = NULL; |
17 | 17 |
18 UserManager::Observer::~Observer() { | 18 UserManager::Observer::~Observer() { |
19 } | 19 } |
20 | 20 |
(...skipping 22 matching lines...) Expand all Loading... |
43 : display_name_(display_name), | 43 : display_name_(display_name), |
44 given_name_(given_name), | 44 given_name_(given_name), |
45 locale_(locale) { | 45 locale_(locale) { |
46 } | 46 } |
47 | 47 |
48 UserManager::UserAccountData::~UserAccountData() {} | 48 UserManager::UserAccountData::~UserAccountData() {} |
49 | 49 |
50 // static | 50 // static |
51 void UserManager::Initialize() { | 51 void UserManager::Initialize() { |
52 CHECK(!g_user_manager); | 52 CHECK(!g_user_manager); |
53 g_user_manager = new UserManagerImpl(); | 53 g_user_manager = new ChromeUserManager(); |
54 } | 54 } |
55 | 55 |
56 // static | 56 // static |
57 bool UserManager::IsInitialized() { | 57 bool UserManager::IsInitialized() { |
58 return g_user_manager; | 58 return g_user_manager; |
59 } | 59 } |
60 | 60 |
61 void UserManager::Destroy() { | 61 void UserManager::Destroy() { |
62 DCHECK(g_user_manager); | 62 DCHECK(g_user_manager); |
63 delete g_user_manager; | 63 delete g_user_manager; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // ProfileHelper has to be initialized after UserManager instance is created. | 99 // ProfileHelper has to be initialized after UserManager instance is created. |
100 ProfileHelper::Get()->Initialize(); | 100 ProfileHelper::Get()->Initialize(); |
101 } | 101 } |
102 | 102 |
103 ScopedTestUserManager::~ScopedTestUserManager() { | 103 ScopedTestUserManager::~ScopedTestUserManager() { |
104 UserManager::Get()->Shutdown(); | 104 UserManager::Get()->Shutdown(); |
105 UserManager::Destroy(); | 105 UserManager::Destroy(); |
106 } | 106 } |
107 | 107 |
108 } // namespace chromeos | 108 } // namespace chromeos |
OLD | NEW |