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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 393343002: Rename "managed (mode|user)" to "supervised user" (part 7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more alphabetize (and rebase again) Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 case LoginState::LOGGED_IN_USER_REGULAR: 400 case LoginState::LOGGED_IN_USER_REGULAR:
401 return ash::user::LOGGED_IN_USER; 401 return ash::user::LOGGED_IN_USER;
402 case LoginState::LOGGED_IN_USER_OWNER: 402 case LoginState::LOGGED_IN_USER_OWNER:
403 return ash::user::LOGGED_IN_OWNER; 403 return ash::user::LOGGED_IN_OWNER;
404 case LoginState::LOGGED_IN_USER_GUEST: 404 case LoginState::LOGGED_IN_USER_GUEST:
405 return ash::user::LOGGED_IN_GUEST; 405 return ash::user::LOGGED_IN_GUEST;
406 case LoginState::LOGGED_IN_USER_RETAIL_MODE: 406 case LoginState::LOGGED_IN_USER_RETAIL_MODE:
407 return ash::user::LOGGED_IN_RETAIL_MODE; 407 return ash::user::LOGGED_IN_RETAIL_MODE;
408 case LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT: 408 case LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT:
409 return ash::user::LOGGED_IN_PUBLIC; 409 return ash::user::LOGGED_IN_PUBLIC;
410 case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED: 410 case LoginState::LOGGED_IN_USER_SUPERVISED:
411 return ash::user::LOGGED_IN_LOCALLY_MANAGED; 411 return ash::user::LOGGED_IN_SUPERVISED;
412 case LoginState::LOGGED_IN_USER_KIOSK_APP: 412 case LoginState::LOGGED_IN_USER_KIOSK_APP:
413 return ash::user::LOGGED_IN_KIOSK_APP; 413 return ash::user::LOGGED_IN_KIOSK_APP;
414 } 414 }
415 NOTREACHED(); 415 NOTREACHED();
416 return ash::user::LOGGED_IN_NONE; 416 return ash::user::LOGGED_IN_NONE;
417 } 417 }
418 418
419 void SystemTrayDelegateChromeOS::ChangeProfilePicture() { 419 void SystemTrayDelegateChromeOS::ChangeProfilePicture() {
420 content::RecordAction( 420 content::RecordAction(
421 base::UserMetricsAction("OpenChangeProfilePictureDialog")); 421 base::UserMetricsAction("OpenChangeProfilePictureDialog"));
422 ShowSettingsSubPageForActiveUser(chrome::kChangeProfilePictureSubPage); 422 ShowSettingsSubPageForActiveUser(chrome::kChangeProfilePictureSubPage);
423 } 423 }
424 424
425 const std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const { 425 const std::string SystemTrayDelegateChromeOS::GetEnterpriseDomain() const {
426 return enterprise_domain_; 426 return enterprise_domain_;
427 } 427 }
428 428
429 const base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const { 429 const base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const {
430 if (GetEnterpriseDomain().empty()) 430 if (GetEnterpriseDomain().empty())
431 return base::string16(); 431 return base::string16();
432 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, 432 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE,
433 base::UTF8ToUTF16(GetEnterpriseDomain())); 433 base::UTF8ToUTF16(GetEnterpriseDomain()));
434 } 434 }
435 435
436 const std::string SystemTrayDelegateChromeOS::GetLocallyManagedUserManager() 436 const std::string SystemTrayDelegateChromeOS::GetSupervisedUserManager() const {
437 const { 437 if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
438 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
439 return std::string(); 438 return std::string();
440 return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayEmail( 439 return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayEmail(
441 chromeos::UserManager::Get()->GetActiveUser()->email()); 440 chromeos::UserManager::Get()->GetActiveUser()->email());
442 } 441 }
443 442
444 const base::string16 443 const base::string16
445 SystemTrayDelegateChromeOS::GetLocallyManagedUserManagerName() const { 444 SystemTrayDelegateChromeOS::GetSupervisedUserManagerName() const {
446 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) 445 if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
447 return base::string16(); 446 return base::string16();
448 return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayName( 447 return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayName(
449 chromeos::UserManager::Get()->GetActiveUser()->email()); 448 chromeos::UserManager::Get()->GetActiveUser()->email());
450 } 449 }
451 450
452 const base::string16 SystemTrayDelegateChromeOS::GetLocallyManagedUserMessage() 451 const base::string16 SystemTrayDelegateChromeOS::GetSupervisedUserMessage()
453 const { 452 const {
454 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) 453 if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
455 return base::string16(); 454 return base::string16();
456 return l10n_util::GetStringFUTF16( 455 return l10n_util::GetStringFUTF16(
457 IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, 456 IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE,
458 base::UTF8ToUTF16(GetLocallyManagedUserManager())); 457 base::UTF8ToUTF16(GetSupervisedUserManager()));
459 } 458 }
460 459
461 bool SystemTrayDelegateChromeOS::SystemShouldUpgrade() const { 460 bool SystemTrayDelegateChromeOS::SystemShouldUpgrade() const {
462 return UpgradeDetector::GetInstance()->notify_upgrade(); 461 return UpgradeDetector::GetInstance()->notify_upgrade();
463 } 462 }
464 463
465 base::HourClockType SystemTrayDelegateChromeOS::GetHourClockType() const { 464 base::HourClockType SystemTrayDelegateChromeOS::GetHourClockType() const {
466 return clock_type_; 465 return clock_type_;
467 } 466 }
468 467
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY); 566 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY);
568 ShowSettingsSubPageForActiveUser(sub_page); 567 ShowSettingsSubPageForActiveUser(sub_page);
569 } 568 }
570 569
571 void SystemTrayDelegateChromeOS::ShowPublicAccountInfo() { 570 void SystemTrayDelegateChromeOS::ShowPublicAccountInfo() {
572 chrome::ScopedTabbedBrowserDisplayer displayer( 571 chrome::ScopedTabbedBrowserDisplayer displayer(
573 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); 572 ProfileManager::GetActiveUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH);
574 chrome::ShowPolicy(displayer.browser()); 573 chrome::ShowPolicy(displayer.browser());
575 } 574 }
576 575
577 void SystemTrayDelegateChromeOS::ShowLocallyManagedUserInfo() { 576 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() {
578 // TODO(antrim): find out what should we show in this case. 577 // TODO(antrim): find out what should we show in this case.
579 // http://crbug.com/229762 578 // http://crbug.com/229762
580 } 579 }
581 580
582 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() { 581 void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
583 ash::user::LoginStatus status = GetUserLoginStatus(); 582 ash::user::LoginStatus status = GetUserLoginStatus();
584 if (status == ash::user::LOGGED_IN_NONE || 583 if (status == ash::user::LOGGED_IN_NONE ||
585 status == ash::user::LOGGED_IN_LOCKED) { 584 status == ash::user::LOGGED_IN_LOCKED) {
586 scoped_refptr<chromeos::HelpAppLauncher> help_app( 585 scoped_refptr<chromeos::HelpAppLauncher> help_app(
587 new chromeos::HelpAppLauncher(GetNativeWindow())); 586 new chromeos::HelpAppLauncher(GetNativeWindow()));
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 accessibility_subscription_.reset(); 1397 accessibility_subscription_.reset();
1399 else 1398 else
1400 OnAccessibilityModeChanged(details.notify); 1399 OnAccessibilityModeChanged(details.notify);
1401 } 1400 }
1402 1401
1403 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1402 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1404 return new SystemTrayDelegateChromeOS(); 1403 return new SystemTrayDelegateChromeOS();
1405 } 1404 }
1406 1405
1407 } // namespace chromeos 1406 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698