Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 14507003: Add tray warning for Locally managed users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win-aura compile error Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
486 return std::string();
487 return UserManager::Get()->GetManagerForManagedUser(GetUserEmail());
488 }
489
490 virtual const string16 GetLocallyManagedUserMessage() const OVERRIDE {
491 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
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
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 // http://crbug.com/229762
572 }
573
555 virtual void ShowEnterpriseInfo() OVERRIDE { 574 virtual void ShowEnterpriseInfo() OVERRIDE {
556 ash::user::LoginStatus status = GetUserLoginStatus(); 575 ash::user::LoginStatus status = GetUserLoginStatus();
557 if (status == ash::user::LOGGED_IN_NONE || 576 if (status == ash::user::LOGGED_IN_NONE ||
558 status == ash::user::LOGGED_IN_LOCKED) { 577 status == ash::user::LOGGED_IN_LOCKED) {
559 scoped_refptr<chromeos::HelpAppLauncher> help_app( 578 scoped_refptr<chromeos::HelpAppLauncher> help_app(
560 new chromeos::HelpAppLauncher( 579 new chromeos::HelpAppLauncher(
561 GetNativeWindowByStatus(GetUserLoginStatus()))); 580 GetNativeWindowByStatus(GetUserLoginStatus())));
562 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE); 581 help_app->ShowHelpTopic(chromeos::HelpAppLauncher::HELP_ENTERPRISE);
563 } else { 582 } else {
564 GURL url(google_util::StringAppendGoogleLocaleParam( 583 GURL url(google_util::StringAppendGoogleLocaleParam(
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1617 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1599 }; 1618 };
1600 1619
1601 } // namespace 1620 } // namespace
1602 1621
1603 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1622 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1604 return new chromeos::SystemTrayDelegate(); 1623 return new chromeos::SystemTrayDelegate();
1605 } 1624 }
1606 1625
1607 } // namespace chromeos 1626 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698