| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 content::RecordAction( | 417 content::RecordAction( |
| 418 content::UserMetricsAction("OpenChangeProfilePictureDialog")); | 418 content::UserMetricsAction("OpenChangeProfilePictureDialog")); |
| 419 ShowSettingsSubPageForAppropriateBrowser( | 419 ShowSettingsSubPageForAppropriateBrowser( |
| 420 chrome::kChangeProfilePictureSubPage); | 420 chrome::kChangeProfilePictureSubPage); |
| 421 } | 421 } |
| 422 | 422 |
| 423 virtual const std::string GetEnterpriseDomain() const OVERRIDE { | 423 virtual const std::string GetEnterpriseDomain() const OVERRIDE { |
| 424 return enterprise_domain_; | 424 return enterprise_domain_; |
| 425 } | 425 } |
| 426 | 426 |
| 427 virtual const string16 GetEnterpriseMessage() const OVERRIDE { | 427 virtual const base::string16 GetEnterpriseMessage() const OVERRIDE { |
| 428 if (GetEnterpriseDomain().empty()) | 428 if (GetEnterpriseDomain().empty()) |
| 429 return string16(); | 429 return base::string16(); |
| 430 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, | 430 return l10n_util::GetStringFUTF16(IDS_DEVICE_OWNED_BY_NOTICE, |
| 431 UTF8ToUTF16(GetEnterpriseDomain())); | 431 UTF8ToUTF16(GetEnterpriseDomain())); |
| 432 } | 432 } |
| 433 | 433 |
| 434 virtual const std::string GetLocallyManagedUserManager() const OVERRIDE { | 434 virtual const std::string GetLocallyManagedUserManager() const OVERRIDE { |
| 435 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) | 435 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) |
| 436 return std::string(); | 436 return std::string(); |
| 437 return UserManager::Get()->GetSupervisedUserManager()-> | 437 return UserManager::Get()->GetSupervisedUserManager()-> |
| 438 GetManagerDisplayEmail( | 438 GetManagerDisplayEmail( |
| 439 chromeos::UserManager::Get()->GetActiveUser()->email()); | 439 chromeos::UserManager::Get()->GetActiveUser()->email()); |
| 440 } | 440 } |
| 441 | 441 |
| 442 virtual const string16 GetLocallyManagedUserManagerName() const OVERRIDE { | 442 virtual const base::string16 GetLocallyManagedUserManagerName() const OVERRIDE
{ |
| 443 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) | 443 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) |
| 444 return string16(); | 444 return base::string16(); |
| 445 return UserManager::Get()->GetSupervisedUserManager()-> | 445 return UserManager::Get()->GetSupervisedUserManager()-> |
| 446 GetManagerDisplayName( | 446 GetManagerDisplayName( |
| 447 chromeos::UserManager::Get()->GetActiveUser()->email()); | 447 chromeos::UserManager::Get()->GetActiveUser()->email()); |
| 448 } | 448 } |
| 449 | 449 |
| 450 virtual const string16 GetLocallyManagedUserMessage() const OVERRIDE { | 450 virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE { |
| 451 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) | 451 if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED) |
| 452 return string16(); | 452 return base::string16(); |
| 453 return l10n_util::GetStringFUTF16( | 453 return l10n_util::GetStringFUTF16( |
| 454 IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, | 454 IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE, |
| 455 UTF8ToUTF16(GetLocallyManagedUserManager())); | 455 UTF8ToUTF16(GetLocallyManagedUserManager())); |
| 456 } | 456 } |
| 457 | 457 |
| 458 virtual bool SystemShouldUpgrade() const OVERRIDE { | 458 virtual bool SystemShouldUpgrade() const OVERRIDE { |
| 459 return UpgradeDetector::GetInstance()->notify_upgrade(); | 459 return UpgradeDetector::GetInstance()->notify_upgrade(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 virtual base::HourClockType GetHourClockType() const OVERRIDE { | 462 virtual base::HourClockType GetHourClockType() const OVERRIDE { |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1238 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1239 }; | 1239 }; |
| 1240 | 1240 |
| 1241 } // namespace | 1241 } // namespace |
| 1242 | 1242 |
| 1243 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1243 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1244 return new chromeos::SystemTrayDelegate(); | 1244 return new chromeos::SystemTrayDelegate(); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 } // namespace chromeos | 1247 } // namespace chromeos |
| OLD | NEW |