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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/linked_ptr.h" 15 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_manager.h" 20 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_manager.h"
21 #include "chrome/browser/chromeos/login/user_flow.h" 21 #include "chrome/browser/chromeos/login/user_flow.h"
22 #include "chrome/browser/chromeos/login/users/affiliation.h" 22 #include "chrome/browser/chromeos/login/users/affiliation.h"
23 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" 23 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h"
24 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 24 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
25 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller_dele gate.h" 25 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller_dele gate.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 : public ChromeUserManager, 59 : public ChromeUserManager,
60 public content::NotificationObserver, 60 public content::NotificationObserver,
61 public policy::CloudExternalDataPolicyObserver::Delegate, 61 public policy::CloudExternalDataPolicyObserver::Delegate,
62 public policy::DeviceLocalAccountPolicyService::Observer, 62 public policy::DeviceLocalAccountPolicyService::Observer,
63 public MultiProfileUserControllerDelegate, 63 public MultiProfileUserControllerDelegate,
64 public BootstrapManager::Delegate { 64 public BootstrapManager::Delegate {
65 public: 65 public:
66 ~ChromeUserManagerImpl() override; 66 ~ChromeUserManagerImpl() override;
67 67
68 // Creates ChromeUserManagerImpl instance. 68 // Creates ChromeUserManagerImpl instance.
69 static scoped_ptr<ChromeUserManager> CreateChromeUserManager(); 69 static std::unique_ptr<ChromeUserManager> CreateChromeUserManager();
70 70
71 // Registers user manager preferences. 71 // Registers user manager preferences.
72 static void RegisterPrefs(PrefRegistrySimple* registry); 72 static void RegisterPrefs(PrefRegistrySimple* registry);
73 73
74 // UserManagerInterface implementation: 74 // UserManagerInterface implementation:
75 BootstrapManager* GetBootstrapManager() override; 75 BootstrapManager* GetBootstrapManager() override;
76 MultiProfileUserController* GetMultiProfileUserController() override; 76 MultiProfileUserController* GetMultiProfileUserController() override;
77 UserImageManager* GetUserImageManager(const AccountId& account_id) override; 77 UserImageManager* GetUserImageManager(const AccountId& account_id) override;
78 SupervisedUserManager* GetSupervisedUserManager() override; 78 SupervisedUserManager* GetSupervisedUserManager() override;
79 UserFlow* GetCurrentUserFlow() const override; 79 UserFlow* GetCurrentUserFlow() const override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const content::NotificationSource& source, 122 const content::NotificationSource& source,
123 const content::NotificationDetails& details) override; 123 const content::NotificationDetails& details) override;
124 124
125 // policy::CloudExternalDataPolicyObserver::Delegate: 125 // policy::CloudExternalDataPolicyObserver::Delegate:
126 void OnExternalDataSet(const std::string& policy, 126 void OnExternalDataSet(const std::string& policy,
127 const std::string& user_id) override; 127 const std::string& user_id) override;
128 void OnExternalDataCleared(const std::string& policy, 128 void OnExternalDataCleared(const std::string& policy,
129 const std::string& user_id) override; 129 const std::string& user_id) override;
130 void OnExternalDataFetched(const std::string& policy, 130 void OnExternalDataFetched(const std::string& policy,
131 const std::string& user_id, 131 const std::string& user_id,
132 scoped_ptr<std::string> data) override; 132 std::unique_ptr<std::string> data) override;
133 133
134 // policy::DeviceLocalAccountPolicyService::Observer implementation. 134 // policy::DeviceLocalAccountPolicyService::Observer implementation.
135 void OnPolicyUpdated(const std::string& user_id) override; 135 void OnPolicyUpdated(const std::string& user_id) override;
136 void OnDeviceLocalAccountsChanged() override; 136 void OnDeviceLocalAccountsChanged() override;
137 137
138 void StopPolicyObserverForTesting(); 138 void StopPolicyObserverForTesting();
139 139
140 // UserManagerBase implementation: 140 // UserManagerBase implementation:
141 bool AreEphemeralUsersEnabled() const override; 141 bool AreEphemeralUsersEnabled() const override;
142 void OnUserRemoved(const AccountId& account_id) override; 142 void OnUserRemoved(const AccountId& account_id) override;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 // Interface to device-local account definitions and associated policy. 250 // Interface to device-local account definitions and associated policy.
251 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; 251 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_;
252 252
253 content::NotificationRegistrar registrar_; 253 content::NotificationRegistrar registrar_;
254 254
255 // User avatar managers. 255 // User avatar managers.
256 UserImageManagerMap user_image_managers_; 256 UserImageManagerMap user_image_managers_;
257 257
258 // Supervised user manager. 258 // Supervised user manager.
259 scoped_ptr<SupervisedUserManagerImpl> supervised_user_manager_; 259 std::unique_ptr<SupervisedUserManagerImpl> supervised_user_manager_;
260 260
261 // Session length limiter. 261 // Session length limiter.
262 scoped_ptr<SessionLengthLimiter> session_length_limiter_; 262 std::unique_ptr<SessionLengthLimiter> session_length_limiter_;
263 263
264 using FlowMap = std::map<AccountId, UserFlow*>; 264 using FlowMap = std::map<AccountId, UserFlow*>;
265 265
266 // Lazy-initialized default flow. 266 // Lazy-initialized default flow.
267 mutable scoped_ptr<UserFlow> default_flow_; 267 mutable std::unique_ptr<UserFlow> default_flow_;
268 268
269 // Specific flows by user e-mail. Keys should be canonicalized before 269 // Specific flows by user e-mail. Keys should be canonicalized before
270 // access. 270 // access.
271 FlowMap specific_flows_; 271 FlowMap specific_flows_;
272 272
273 scoped_ptr<CrosSettings::ObserverSubscription> local_accounts_subscription_; 273 std::unique_ptr<CrosSettings::ObserverSubscription>
274 local_accounts_subscription_;
274 275
275 scoped_ptr<MultiProfileUserController> multi_profile_user_controller_; 276 std::unique_ptr<MultiProfileUserController> multi_profile_user_controller_;
276 277
277 // Observer for the policy that can be used to manage user images. 278 // Observer for the policy that can be used to manage user images.
278 scoped_ptr<policy::CloudExternalDataPolicyObserver> avatar_policy_observer_; 279 std::unique_ptr<policy::CloudExternalDataPolicyObserver>
280 avatar_policy_observer_;
279 281
280 // Observer for the policy that can be used to manage wallpapers. 282 // Observer for the policy that can be used to manage wallpapers.
281 scoped_ptr<policy::CloudExternalDataPolicyObserver> 283 std::unique_ptr<policy::CloudExternalDataPolicyObserver>
282 wallpaper_policy_observer_; 284 wallpaper_policy_observer_;
283 285
284 scoped_ptr<BootstrapManager> bootstrap_manager_; 286 std::unique_ptr<BootstrapManager> bootstrap_manager_;
285 287
286 base::WeakPtrFactory<ChromeUserManagerImpl> weak_factory_; 288 base::WeakPtrFactory<ChromeUserManagerImpl> weak_factory_;
287 289
288 DISALLOW_COPY_AND_ASSIGN(ChromeUserManagerImpl); 290 DISALLOW_COPY_AND_ASSIGN(ChromeUserManagerImpl);
289 }; 291 };
290 292
291 } // namespace chromeos 293 } // namespace chromeos
292 294
293 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_ 295 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_CHROME_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698