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

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

Issue 12218078: Implement a policy to autologin a public account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: r3b@$3 Created 7 years, 9 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual User* GetLoggedInUser() OVERRIDE; 91 virtual User* GetLoggedInUser() OVERRIDE;
92 92
93 virtual UserImageManager* GetUserImageManager() OVERRIDE; 93 virtual UserImageManager* GetUserImageManager() OVERRIDE;
94 94
95 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; 95 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE;
96 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; 96 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE;
97 97
98 // Sets a new User instance. 98 // Sets a new User instance.
99 void SetLoggedInUser(const std::string& email); 99 void SetLoggedInUser(const std::string& email);
100 100
101 // Creates a new public session user.
102 User* CreatePublicAccountUser(const std::string& email);
103
101 User* user_; 104 User* user_;
102 scoped_ptr<MockUserImageManager> user_image_manager_; 105 scoped_ptr<MockUserImageManager> user_image_manager_;
103 scoped_ptr<UserFlow> user_flow_; 106 scoped_ptr<UserFlow> user_flow_;
104 }; 107 };
105 108
106 // Class that provides easy life-cycle management for mocking the UserManager 109 // Class that provides easy life-cycle management for mocking the UserManager
107 // for tests. 110 // for tests.
108 class ScopedMockUserManagerEnabler { 111 class ScopedMockUserManagerEnabler {
109 public: 112 public:
110 ScopedMockUserManagerEnabler(); 113 ScopedMockUserManagerEnabler();
111 ~ScopedMockUserManagerEnabler(); 114 ~ScopedMockUserManagerEnabler();
112 115
113 MockUserManager* user_manager(); 116 MockUserManager* user_manager();
114 117
115 private: 118 private:
116 UserManager* old_user_manager_; 119 UserManager* old_user_manager_;
117 scoped_ptr<MockUserManager> user_manager_; 120 scoped_ptr<MockUserManager> user_manager_;
118 }; 121 };
119 122
120 } // namespace chromeos 123 } // namespace chromeos
121 124
122 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 125 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_login_display_host.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