Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / session / user_session_manager_test_api.h
blob3312a961f3c42f8b23ff7795dd1da8317c1c695a
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"
11 namespace chromeos {
12 namespace test {
14 // Accesses private data from a UserSessionManager for testing.
15 class UserSessionManagerTestApi {
16 public:
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
24 // (used in tests).
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);
30 private:
31 UserSessionManager* session_manager_; // not owned
33 DISALLOW_COPY_AND_ASSIGN(UserSessionManagerTestApi);
36 } // namespace test
37 } // namespace chromeos
39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SESSION_USER_SESSION_MANAGER_TEST_API_H_