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

Side by Side Diff: chrome/browser/chromeos/login/lock/screen_locker.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: iwyu fixes 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_LOCK_SCREEN_LOCKER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/sequenced_task_runner_helpers.h" 15 #include "base/sequenced_task_runner_helpers.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "chrome/browser/chromeos/login/help_app_launcher.h" 17 #include "chrome/browser/chromeos/login/help_app_launcher.h"
18 #include "chrome/browser/chromeos/login/lock/screen_locker_delegate.h" 18 #include "chrome/browser/chromeos/login/lock/screen_locker_delegate.h"
19 #include "chrome/browser/chromeos/login/ui/login_display.h" 19 #include "chrome/browser/chromeos/login/ui/login_display.h"
20 #include "chromeos/login/auth/auth_status_consumer.h" 20 #include "chromeos/login/auth/auth_status_consumer.h"
21 #include "chromeos/login/auth/user_context.h" 21 #include "chromeos/login/auth/user_context.h"
22 #include "components/user_manager/user.h" 22 #include "components/user_manager/user.h"
23 #include "ui/base/accelerators/accelerator.h" 23 #include "ui/base/accelerators/accelerator.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Called when screen locker is safe to delete. 142 // Called when screen locker is safe to delete.
143 static void ScheduleDeletion(); 143 static void ScheduleDeletion();
144 144
145 // Returns true if |username| is found among logged in users. 145 // Returns true if |username| is found among logged in users.
146 bool IsUserLoggedIn(const std::string& username); 146 bool IsUserLoggedIn(const std::string& username);
147 147
148 // Looks up user in unlock user list. 148 // Looks up user in unlock user list.
149 const user_manager::User* FindUnlockUser(const std::string& user_id); 149 const user_manager::User* FindUnlockUser(const std::string& user_id);
150 150
151 // ScreenLockerDelegate instance in use. 151 // ScreenLockerDelegate instance in use.
152 scoped_ptr<ScreenLockerDelegate> delegate_; 152 std::unique_ptr<ScreenLockerDelegate> delegate_;
153 153
154 // Users that can unlock the device. 154 // Users that can unlock the device.
155 user_manager::UserList users_; 155 user_manager::UserList users_;
156 156
157 // Used to authenticate the user to unlock. 157 // Used to authenticate the user to unlock.
158 scoped_refptr<Authenticator> authenticator_; 158 scoped_refptr<Authenticator> authenticator_;
159 159
160 // Used to authenticate the user to unlock supervised users. 160 // Used to authenticate the user to unlock supervised users.
161 scoped_refptr<ExtendedAuthenticator> extended_authenticator_; 161 scoped_refptr<ExtendedAuthenticator> extended_authenticator_;
162 162
(...skipping 13 matching lines...) Expand all
176 176
177 // Delegate to forward all login status events to. 177 // Delegate to forward all login status events to.
178 // Tests can use this to receive login status events. 178 // Tests can use this to receive login status events.
179 AuthStatusConsumer* auth_status_consumer_; 179 AuthStatusConsumer* auth_status_consumer_;
180 180
181 // Number of bad login attempts in a row. 181 // Number of bad login attempts in a row.
182 int incorrect_passwords_count_; 182 int incorrect_passwords_count_;
183 183
184 // Copy of parameters passed to last call of OnLoginSuccess for usage in 184 // Copy of parameters passed to last call of OnLoginSuccess for usage in
185 // UnlockOnLoginSuccess(). 185 // UnlockOnLoginSuccess().
186 scoped_ptr<AuthenticationParametersCapture> authentication_capture_; 186 std::unique_ptr<AuthenticationParametersCapture> authentication_capture_;
187 187
188 // Provider for button icon set by the screenlockPrivate API. 188 // Provider for button icon set by the screenlockPrivate API.
189 scoped_ptr<ScreenlockIconProvider> screenlock_icon_provider_; 189 std::unique_ptr<ScreenlockIconProvider> screenlock_icon_provider_;
190 190
191 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; 191 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_;
192 192
193 base::WeakPtrFactory<ScreenLocker> weak_factory_; 193 base::WeakPtrFactory<ScreenLocker> weak_factory_;
194 194
195 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); 195 DISALLOW_COPY_AND_ASSIGN(ScreenLocker);
196 }; 196 };
197 197
198 } // namespace chromeos 198 } // namespace chromeos
199 199
200 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ 200 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698