| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ash/test/test_system_tray_delegate.h" | 5 #include "ash/test/test_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "ash/common/login_status.h" | 9 #include "ash/common/login_status.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace test { | 16 namespace test { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 bool g_system_update_required = false; | 20 bool g_system_update_required = false; |
| 21 LoginStatus g_initial_status = LoginStatus::USER; | 21 LoginStatus g_initial_status = LoginStatus::USER; |
| 22 | 22 |
| 23 } // namespace | 23 } // namespace |
| 24 | 24 |
| 25 TestSystemTrayDelegate::TestSystemTrayDelegate() | 25 TestSystemTrayDelegate::TestSystemTrayDelegate() |
| 26 : should_show_display_notification_(false), | 26 : should_show_display_notification_(false), |
| 27 login_status_(g_initial_status), | 27 login_status_(g_initial_status), |
| 28 session_length_limit_set_(false) { | 28 session_length_limit_set_(false) {} |
| 29 } | |
| 30 | 29 |
| 31 TestSystemTrayDelegate::~TestSystemTrayDelegate() { | 30 TestSystemTrayDelegate::~TestSystemTrayDelegate() {} |
| 32 } | |
| 33 | 31 |
| 34 // static | 32 // static |
| 35 void TestSystemTrayDelegate::SetInitialLoginStatus(LoginStatus login_status) { | 33 void TestSystemTrayDelegate::SetInitialLoginStatus(LoginStatus login_status) { |
| 36 g_initial_status = login_status; | 34 g_initial_status = login_status; |
| 37 } | 35 } |
| 38 | 36 |
| 39 // static | 37 // static |
| 40 void TestSystemTrayDelegate::SetSystemUpdateRequired(bool required) { | 38 void TestSystemTrayDelegate::SetSystemUpdateRequired(bool required) { |
| 41 g_system_update_required = required; | 39 g_system_update_required = required; |
| 42 } | 40 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 *session_length_limit = session_length_limit_; | 103 *session_length_limit = session_length_limit_; |
| 106 return session_length_limit_set_; | 104 return session_length_limit_set_; |
| 107 } | 105 } |
| 108 | 106 |
| 109 void TestSystemTrayDelegate::SignOut() { | 107 void TestSystemTrayDelegate::SignOut() { |
| 110 base::MessageLoop::current()->QuitWhenIdle(); | 108 base::MessageLoop::current()->QuitWhenIdle(); |
| 111 } | 109 } |
| 112 | 110 |
| 113 } // namespace test | 111 } // namespace test |
| 114 } // namespace ash | 112 } // namespace ash |
| OLD | NEW |