OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "chrome/browser/chromeos/login/user_flow.h" | 13 #include "chrome/browser/chromeos/login/user_flow.h" |
14 #include "chrome/browser/chromeos/login/users/user_manager_interface.h" | 14 #include "chrome/browser/chromeos/login/users/user_manager_interface.h" |
15 #include "components/user_manager/fake_user_manager.h" | 15 #include "components/user_manager/fake_user_manager.h" |
16 #include "components/user_manager/user.h" | 16 #include "components/user_manager/user.h" |
17 #include "components/user_manager/user_image/user_image.h" | 17 #include "components/user_manager/user_image/user_image.h" |
18 #include "components/user_manager/user_manager_base.h" | 18 #include "components/user_manager/user_manager_base.h" |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 class FakeSupervisedUserManager; | 22 class FakeSupervisedUserManager; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 void set_multi_profile_user_controller( | 94 void set_multi_profile_user_controller( |
95 MultiProfileUserController* controller) { | 95 MultiProfileUserController* controller) { |
96 multi_profile_user_controller_ = controller; | 96 multi_profile_user_controller_ = controller; |
97 } | 97 } |
98 | 98 |
99 private: | 99 private: |
100 // Lazily creates default user flow. | 100 // Lazily creates default user flow. |
101 UserFlow* GetDefaultUserFlow() const; | 101 UserFlow* GetDefaultUserFlow() const; |
102 | 102 |
103 scoped_ptr<FakeSupervisedUserManager> supervised_user_manager_; | 103 std::unique_ptr<FakeSupervisedUserManager> supervised_user_manager_; |
104 AccountId owner_account_id_ = EmptyAccountId(); | 104 AccountId owner_account_id_ = EmptyAccountId(); |
105 | 105 |
106 BootstrapManager* bootstrap_manager_; | 106 BootstrapManager* bootstrap_manager_; |
107 MultiProfileUserController* multi_profile_user_controller_; | 107 MultiProfileUserController* multi_profile_user_controller_; |
108 | 108 |
109 // Lazy-initialized default flow. | 109 // Lazy-initialized default flow. |
110 mutable scoped_ptr<UserFlow> default_flow_; | 110 mutable std::unique_ptr<UserFlow> default_flow_; |
111 | 111 |
112 using FlowMap = std::map<AccountId, UserFlow*>; | 112 using FlowMap = std::map<AccountId, UserFlow*>; |
113 | 113 |
114 // Specific flows by user e-mail. | 114 // Specific flows by user e-mail. |
115 // Keys should be canonicalized before access. | 115 // Keys should be canonicalized before access. |
116 FlowMap specific_flows_; | 116 FlowMap specific_flows_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(FakeChromeUserManager); | 118 DISALLOW_COPY_AND_ASSIGN(FakeChromeUserManager); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace chromeos | 121 } // namespace chromeos |
122 | 122 |
123 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ | 123 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_FAKE_CHROME_USER_MANAGER_H_ |
OLD | NEW |