Chromium Code Reviews| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 return enterprise_domain_; | 474 return enterprise_domain_; |
| 475 } | 475 } |
| 476 | 476 |
| 477 virtual const string16 GetEnterpriseMessage() const OVERRIDE { | 477 virtual const string16 GetEnterpriseMessage() const OVERRIDE { |
| 478 if (GetEnterpriseDomain().empty()) | 478 if (GetEnterpriseDomain().empty()) |
| 479 return string16(); | 479 return string16(); |
| 480 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, | 480 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, |
| 481 UTF8ToUTF16(GetEnterpriseDomain())); | 481 UTF8ToUTF16(GetEnterpriseDomain())); |
| 482 } | 482 } |
| 483 | 483 |
| 484 virtual const std::string GetLocallyManagedUserManager() const OVERRIDE { | |
| 485 if (ash::user::LOGGED_IN_LOCALLY_MANAGED != GetUserLoginStatus()) | |
|
Daniel Erat
2013/04/29 13:32:57
nit: if (GetUserLoginStatus() != ash::user::...)
Denis Kuznetsov (DE-MUC)
2013/04/29 14:14:58
Done.
| |
| 486 return std::string(); | |
| 487 return UserManager::Get()->GetManagerForManagedUser(GetUserEmail()); | |
| 488 } | |
| 489 | |
| 490 virtual const string16 GetLocallyManagedUserMessage() const OVERRIDE { | |
| 491 if (ash::user::LOGGED_IN_LOCALLY_MANAGED != GetUserLoginStatus()) | |
|
Daniel Erat
2013/04/29 13:32:57
nit: if (GetUserLoginStatus() != ash::user::...)
Denis Kuznetsov (DE-MUC)
2013/04/29 14:14:58
Done.
| |
| 492 return string16(); | |
| 493 return l10n_util::GetStringFUTF16(IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, | |
| 494 UTF8ToUTF16( | |
| 495 GetLocallyManagedUserManager())); | |
| 496 } | |
| 497 | |
| 484 virtual bool SystemShouldUpgrade() const OVERRIDE { | 498 virtual bool SystemShouldUpgrade() const OVERRIDE { |
| 485 return UpgradeDetector::GetInstance()->notify_upgrade(); | 499 return UpgradeDetector::GetInstance()->notify_upgrade(); |
| 486 } | 500 } |
| 487 | 501 |
| 488 virtual base::HourClockType GetHourClockType() const OVERRIDE { | 502 virtual base::HourClockType GetHourClockType() const OVERRIDE { |
| 489 return clock_type_; | 503 return clock_type_; |
| 490 } | 504 } |
| 491 | 505 |
| 492 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { | 506 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { |
| 493 return power_supply_status_; | 507 return power_supply_status_; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 545 } | 559 } |
| 546 | 560 |
| 547 virtual void ShowAccessibilityHelp() OVERRIDE { | 561 virtual void ShowAccessibilityHelp() OVERRIDE { |
| 548 accessibility::ShowAccessibilityHelp(GetAppropriateBrowser()); | 562 accessibility::ShowAccessibilityHelp(GetAppropriateBrowser()); |
| 549 } | 563 } |
| 550 | 564 |
| 551 virtual void ShowPublicAccountInfo() OVERRIDE { | 565 virtual void ShowPublicAccountInfo() OVERRIDE { |
| 552 chrome::ShowPolicy(GetAppropriateBrowser()); | 566 chrome::ShowPolicy(GetAppropriateBrowser()); |
| 553 } | 567 } |
| 554 | 568 |
| 569 virtual void ShowLocallyManagedUserInfo() OVERRIDE { | |
| 570 // TODO(antrim): find out what should we show in this case. | |
| 571 } | |
| 572 | |
| 555 virtual void ShowEnterpriseInfo() OVERRIDE { | 573 virtual void ShowEnterpriseInfo() OVERRIDE { |
| 556 ash::user::LoginStatus status = GetUserLoginStatus(); | 574 ash::user::LoginStatus status = GetUserLoginStatus(); |
| 557 if (status == ash::user::LOGGED_IN_NONE || | 575 if (status == ash::user::LOGGED_IN_NONE || |
| 558 status == ash::user::LOGGED_IN_LOCKED) { | 576 status == ash::user::LOGGED_IN_LOCKED) { |
| 559 scoped_refptr<chromeos::HelpAppLauncher> help_app( | 577 scoped_refptr<chromeos::HelpAppLauncher> help_app( |
| 560 new chromeos::HelpAppLauncher( | 578 new chromeos::HelpAppLauncher( |
| 561 GetNativeWindowByStatus(GetUserLoginStatus()))); | 579 GetNativeWindowByStatus(GetUserLoginStatus()))); |
| 562 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); | 580 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); |
| 563 } else { | 581 } else { |
| 564 GURL url(google_util::StringAppendGoogleLocaleParam( | 582 GURL url(google_util::StringAppendGoogleLocaleParam( |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1598 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1616 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1599 }; | 1617 }; |
| 1600 | 1618 |
| 1601 } // namespace | 1619 } // namespace |
| 1602 | 1620 |
| 1603 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1621 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1604 return new chromeos::SystemTrayDelegate(); | 1622 return new chromeos::SystemTrayDelegate(); |
| 1605 } | 1623 } |
| 1606 | 1624 |
| 1607 } // namespace chromeos | 1625 } // namespace chromeos |
| OLD | NEW |