OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
714 device_local_account_type); | 714 device_local_account_type); |
715 | 715 |
716 active_user_ = user_manager::User::CreateKioskAppUser(app_id); | 716 active_user_ = user_manager::User::CreateKioskAppUser(app_id); |
717 active_user_->SetStubImage( | 717 active_user_->SetStubImage( |
718 user_manager::UserImage( | 718 user_manager::UserImage( |
719 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 719 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
720 IDR_PROFILE_PICTURE_LOADING)), | 720 IDR_PROFILE_PICTURE_LOADING)), |
721 user_manager::User::USER_IMAGE_INVALID, | 721 user_manager::User::USER_IMAGE_INVALID, |
722 false); | 722 false); |
723 | 723 |
724 SetIsCurrentUserNew(true); | |
xiyuan
2015/02/25 20:18:43
KioskAppLoggedIn is called on every kiosk app laun
Alexander Alekseev
2015/02/25 20:48:47
We only need to call SetFirstLoginPrefs for the fi
xiyuan
2015/02/25 21:20:50
Think we can use Profile::IsNewProfile to check wh
| |
724 WallpaperManager::Get()->SetUserWallpaperNow(app_id); | 725 WallpaperManager::Get()->SetUserWallpaperNow(app_id); |
725 | 726 |
726 // TODO(bartfab): Add KioskAppUsers to the users_ list and keep metadata like | 727 // TODO(bartfab): Add KioskAppUsers to the users_ list and keep metadata like |
727 // the kiosk_app_id in these objects, removing the need to re-parse the | 728 // the kiosk_app_id in these objects, removing the need to re-parse the |
728 // device-local account list here to extract the kiosk_app_id. | 729 // device-local account list here to extract the kiosk_app_id. |
729 const std::vector<policy::DeviceLocalAccount> device_local_accounts = | 730 const std::vector<policy::DeviceLocalAccount> device_local_accounts = |
730 policy::GetDeviceLocalAccounts(cros_settings_); | 731 policy::GetDeviceLocalAccounts(cros_settings_); |
731 const policy::DeviceLocalAccount* account = NULL; | 732 const policy::DeviceLocalAccount* account = NULL; |
732 for (std::vector<policy::DeviceLocalAccount>::const_iterator it = | 733 for (std::vector<policy::DeviceLocalAccount>::const_iterator it = |
733 device_local_accounts.begin(); | 734 device_local_accounts.begin(); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1081 | 1082 |
1082 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && | 1083 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && |
1083 !system::HasSystemTimezonePolicy()) { | 1084 !system::HasSystemTimezonePolicy()) { |
1084 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); | 1085 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); |
1085 } else { | 1086 } else { |
1086 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); | 1087 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); |
1087 } | 1088 } |
1088 } | 1089 } |
1089 | 1090 |
1090 } // namespace chromeos | 1091 } // namespace chromeos |
OLD | NEW |