1 // Copyright (c) 2015 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_TEST_API_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_TEST_API_H_
8 #include "base/basictypes.h"
9 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
14 // Accesses private data from a UserSessionManager for testing.
15 class UserSessionManagerTestApi
{
17 explicit UserSessionManagerTestApi(UserSessionManager
* session_manager
);
19 // Injects |user_context| that will be used to create StubAuthenticator
20 // instance when UserSessionManager::CreateAuthenticator() is called.
21 void InjectStubUserContext(const UserContext
& user_context
);
23 // Controls whether browser instance should be launched after sign in
25 void SetShouldLaunchBrowserInTests(bool should_launch_browser
);
27 // Controls whether token handle fetching is enabled (used in tests).
28 void SetShouldObtainTokenHandleInTests(bool should_obtain_handle
);
31 UserSessionManager
* session_manager_
; // not owned
33 DISALLOW_COPY_AND_ASSIGN(UserSessionManagerTestApi
);
37 } // namespace chromeos
39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_TEST_API_H_