| OLD | NEW |
| 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 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 464 |
| 465 // Overridden from ash::SystemTrayDelegate: | 465 // Overridden from ash::SystemTrayDelegate: |
| 466 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { | 466 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { |
| 467 // In case of OOBE / sign in screen tray will be shown later. | 467 // In case of OOBE / sign in screen tray will be shown later. |
| 468 return LoginState::Get()->IsUserLoggedIn(); | 468 return LoginState::Get()->IsUserLoggedIn(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 virtual ash::user::LoginStatus GetUserLoginStatus() const OVERRIDE { | 471 virtual ash::user::LoginStatus GetUserLoginStatus() const OVERRIDE { |
| 472 // Map ChromeOS specific LOGGED_IN states to Ash LOGGED_IN states. | 472 // Map ChromeOS specific LOGGED_IN states to Ash LOGGED_IN states. |
| 473 LoginState::LoggedInState state = LoginState::Get()->GetLoggedInState(); | 473 LoginState::LoggedInState state = LoginState::Get()->GetLoggedInState(); |
| 474 if (state == LoginState::LOGGED_IN_OOBE || | 474 if (!LoginState::Get()->IsSessionStarted() || |
| 475 state == LoginState::LOGGED_IN_OOBE || |
| 475 state == LoginState::LOGGED_IN_NONE) { | 476 state == LoginState::LOGGED_IN_NONE) { |
| 476 return ash::user::LOGGED_IN_NONE; | 477 return ash::user::LOGGED_IN_NONE; |
| 477 } | 478 } |
| 478 if (screen_locked_) | 479 if (screen_locked_) |
| 479 return ash::user::LOGGED_IN_LOCKED; | 480 return ash::user::LOGGED_IN_LOCKED; |
| 480 | 481 |
| 481 LoginState::LoggedInUserType user_type = | 482 LoginState::LoggedInUserType user_type = |
| 482 LoginState::Get()->GetLoggedInUserType(); | 483 LoginState::Get()->GetLoggedInUserType(); |
| 483 switch (user_type) { | 484 switch (user_type) { |
| 484 case LoginState::LOGGED_IN_USER_NONE: | 485 case LoginState::LOGGED_IN_USER_NONE: |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1338 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1338 }; | 1339 }; |
| 1339 | 1340 |
| 1340 } // namespace | 1341 } // namespace |
| 1341 | 1342 |
| 1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1343 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1343 return new chromeos::SystemTrayDelegate(); | 1344 return new chromeos::SystemTrayDelegate(); |
| 1344 } | 1345 } |
| 1345 | 1346 |
| 1346 } // namespace chromeos | 1347 } // namespace chromeos |
| OLD | NEW |