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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SCOPED_USER_MANAGER_ENABLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SCOPED_USER_MANAGER_ENABLER_H_
7
8 #include "base/basictypes.h"
9
10 namespace user_manager {
11 class UserManager;
12 }
13
14 namespace chromeos {
15
16 // Helper class for unit tests. Initializes the UserManager singleton to the
17 // given |user_manager| and tears it down again on destruction. If the singleton
18 // had already been initialized, its previous value is restored after tearing
19 // down |user_manager|.
20 class ScopedUserManagerEnabler {
21 public:
22 // Takes ownership of |user_manager|.
23 explicit ScopedUserManagerEnabler(user_manager::UserManager* user_manager);
24 ~ScopedUserManagerEnabler();
25
26 private:
27 user_manager::UserManager* previous_user_manager_;
28
29 DISALLOW_COPY_AND_ASSIGN(ScopedUserManagerEnabler);
30 };
31
32 } // namespace chromeos
33
34 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_SCOPED_USER_MANAGER_ENABLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698