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

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: split out FakeSessionManagerClient Created 7 years, 10 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual User* GetLoggedInUser() OVERRIDE; 82 virtual User* GetLoggedInUser() OVERRIDE;
83 83
84 virtual UserImageManager* GetUserImageManager() OVERRIDE; 84 virtual UserImageManager* GetUserImageManager() OVERRIDE;
85 85
86 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE; 86 virtual UserFlow* GetCurrentUserFlow() const OVERRIDE;
87 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE; 87 virtual UserFlow* GetUserFlow(const std::string&) const OVERRIDE;
88 88
89 // Sets a new User instance. 89 // Sets a new User instance.
90 void SetLoggedInUser(const std::string& email); 90 void SetLoggedInUser(const std::string& email);
91 91
92 // Creates a new public account user.
bartfab (slow) 2013/02/25 16:51:23 Nit: Since we are switching over to the term "publ
dconnelly 2013/02/26 18:04:15 Done.
93 User* CreatePublicAccountUser(const std::string& email);
94
92 User* user_; 95 User* user_;
93 scoped_ptr<MockUserImageManager> user_image_manager_; 96 scoped_ptr<MockUserImageManager> user_image_manager_;
94 scoped_ptr<UserFlow> user_flow_; 97 scoped_ptr<UserFlow> user_flow_;
95 }; 98 };
96 99
97 // Class that provides easy life-cycle management for mocking the UserManager 100 // Class that provides easy life-cycle management for mocking the UserManager
98 // for tests. 101 // for tests.
99 class ScopedMockUserManagerEnabler { 102 class ScopedMockUserManagerEnabler {
100 public: 103 public:
101 ScopedMockUserManagerEnabler(); 104 ScopedMockUserManagerEnabler();
102 ~ScopedMockUserManagerEnabler(); 105 ~ScopedMockUserManagerEnabler();
103 106
104 MockUserManager* user_manager(); 107 MockUserManager* user_manager();
105 108
106 private: 109 private:
107 UserManager* old_user_manager_; 110 UserManager* old_user_manager_;
108 scoped_ptr<MockUserManager> user_manager_; 111 scoped_ptr<MockUserManager> user_manager_;
109 }; 112 };
110 113
111 } // namespace chromeos 114 } // namespace chromeos
112 115
113 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 116 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698