| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ | 5 #ifndef CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ |
| 6 #define CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ | 6 #define CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 // A class to start and shutdown public session state for a test. | 12 // A class to start and shutdown public session state for a test. Only one |
| 13 // instance is allowed to exist at a given time. To be instantiated on the stack |
| 14 // (so it nicely cleans up after going out of scope). |
| 13 class ScopedTestPublicSessionLoginState { | 15 class ScopedTestPublicSessionLoginState { |
| 14 public: | 16 public: |
| 15 ScopedTestPublicSessionLoginState(); | 17 ScopedTestPublicSessionLoginState(); |
| 16 ~ScopedTestPublicSessionLoginState(); | 18 ~ScopedTestPublicSessionLoginState(); |
| 17 | 19 |
| 18 private: | 20 private: |
| 21 bool needs_shutdown_ = false; |
| 22 |
| 19 DISALLOW_COPY_AND_ASSIGN(ScopedTestPublicSessionLoginState); | 23 DISALLOW_COPY_AND_ASSIGN(ScopedTestPublicSessionLoginState); |
| 20 }; | 24 }; |
| 21 | 25 |
| 22 } // namespace chromeos | 26 } // namespace chromeos |
| 23 | 27 |
| 24 #endif // CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ | 28 #endif // CHROMEOS_LOGIN_SCOPED_TEST_PUBLIC_SESSION_LOGIN_STATE_H_ |
| OLD | NEW |