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

Side by Side Diff: chrome/browser/chromeos/login/mock_user_manager.h

Issue 14028010: CrOS multi-profiles ProfileManager changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MOCK_USER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual User* GetLoggedInUser() OVERRIDE; 95 virtual User* GetLoggedInUser() OVERRIDE;
96 virtual const User* GetActiveUser() const OVERRIDE; 96 virtual const User* GetActiveUser() const OVERRIDE;
97 virtual User* GetActiveUser() OVERRIDE; 97 virtual User* GetActiveUser() OVERRIDE;
98 98
99 virtual UserImageManager* GetUserImageManager() OVERRIDE; 99 virtual UserImageManager* GetUserImageManager() OVERRIDE;
100 100
101 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; 101 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE;
102 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; 102 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE;
103 103
104 // Sets a new User instance. 104 // Sets a new User instance.
105 void SetLoggedInUser(const std::string& email); 105 void SetActiveUser(const std::string& email);
106 106
107 // Creates a new public session user. 107 // Creates a new public session user.
108 User* CreatePublicAccountUser(const std::string& email); 108 User* CreatePublicAccountUser(const std::string& email);
109 109
110 User* user_; 110 User* user_;
111 scoped_ptr<MockUserImageManager> user_image_manager_; 111 scoped_ptr<MockUserImageManager> user_image_manager_;
112 scoped_ptr<UserFlow> user_flow_; 112 scoped_ptr<UserFlow> user_flow_;
113 }; 113 };
114 114
115 // Class that provides easy life-cycle management for mocking the UserManager 115 // Class that provides easy life-cycle management for mocking the UserManager
116 // for tests. 116 // for tests.
117 class ScopedMockUserManagerEnabler { 117 class ScopedMockUserManagerEnabler {
118 public: 118 public:
119 ScopedMockUserManagerEnabler(); 119 ScopedMockUserManagerEnabler();
120 ~ScopedMockUserManagerEnabler(); 120 ~ScopedMockUserManagerEnabler();
121 121
122 MockUserManager* user_manager(); 122 MockUserManager* user_manager();
123 123
124 private: 124 private:
125 UserManager* old_user_manager_; 125 UserManager* old_user_manager_;
126 scoped_ptr<MockUserManager> user_manager_; 126 scoped_ptr<MockUserManager> user_manager_;
127 }; 127 };
128 128
129 } // namespace chromeos 129 } // namespace chromeos
130 130
131 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 131 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_unittest.cc ('k') | chrome/browser/chromeos/login/mock_user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698