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

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

Issue 12457029: Implement a policy to auto-login a public account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another rebase because the bots dont want to apply the patch 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 virtual User* GetLoggedInUser() OVERRIDE; 93 virtual User* GetLoggedInUser() OVERRIDE;
94 94
95 virtual UserImageManager* GetUserImageManager() OVERRIDE; 95 virtual UserImageManager* GetUserImageManager() OVERRIDE;
96 96
97 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; 97 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE;
98 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; 98 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE;
99 99
100 // Sets a new User instance. 100 // Sets a new User instance.
101 void SetLoggedInUser(const std::string& email); 101 void SetLoggedInUser(const std::string& email);
102 102
103 // Creates a new public session user.
104 User* CreatePublicAccountUser(const std::string& email);
105
103 User* user_; 106 User* user_;
104 scoped_ptr<MockUserImageManager> user_image_manager_; 107 scoped_ptr<MockUserImageManager> user_image_manager_;
105 scoped_ptr<UserFlow> user_flow_; 108 scoped_ptr<UserFlow> user_flow_;
106 }; 109 };
107 110
108 // Class that provides easy life-cycle management for mocking the UserManager 111 // Class that provides easy life-cycle management for mocking the UserManager
109 // for tests. 112 // for tests.
110 class ScopedMockUserManagerEnabler { 113 class ScopedMockUserManagerEnabler {
111 public: 114 public:
112 ScopedMockUserManagerEnabler(); 115 ScopedMockUserManagerEnabler();
113 ~ScopedMockUserManagerEnabler(); 116 ~ScopedMockUserManagerEnabler();
114 117
115 MockUserManager* user_manager(); 118 MockUserManager* user_manager();
116 119
117 private: 120 private:
118 UserManager* old_user_manager_; 121 UserManager* old_user_manager_;
119 scoped_ptr<MockUserManager> user_manager_; 122 scoped_ptr<MockUserManager> user_manager_;
120 }; 123 };
121 124
122 } // namespace chromeos 125 } // namespace chromeos
123 126
124 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 127 #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