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/wallpaper/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
10 #include "ash/common/wallpaper/wallpaper_controller.h" | 10 #include "ash/common/wallpaper/wallpaper_controller.h" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 // Some unit tests come here without a UserManager or without a pref system. | 689 // Some unit tests come here without a UserManager or without a pref system. |
690 if (!user_manager::UserManager::IsInitialized() || | 690 if (!user_manager::UserManager::IsInitialized() || |
691 !g_browser_process->local_state()) { | 691 !g_browser_process->local_state()) { |
692 return; | 692 return; |
693 } | 693 } |
694 | 694 |
695 const user_manager::User* user = | 695 const user_manager::User* user = |
696 user_manager::UserManager::Get()->FindUser(account_id); | 696 user_manager::UserManager::Get()->FindUser(account_id); |
697 | 697 |
698 // User is unknown or there is no visible wallpaper in kiosk mode. | 698 // User is unknown or there is no visible wallpaper in kiosk mode. |
699 if (!user || user->GetType() == user_manager::USER_TYPE_KIOSK_APP) | 699 if (!user || user->GetType() == user_manager::USER_TYPE_KIOSK_APP || |
| 700 user->GetType() == user_manager::USER_TYPE_ARC_KIOSK_APP) { |
700 return; | 701 return; |
| 702 } |
701 | 703 |
702 // Guest user or regular user in ephemeral mode. | 704 // Guest user or regular user in ephemeral mode. |
703 if ((user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral( | 705 if ((user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral( |
704 account_id) && | 706 account_id) && |
705 user->HasGaiaAccount()) || | 707 user->HasGaiaAccount()) || |
706 user->GetType() == user_manager::USER_TYPE_GUEST) { | 708 user->GetType() == user_manager::USER_TYPE_GUEST) { |
707 InitInitialUserWallpaper(account_id, false); | 709 InitInitialUserWallpaper(account_id, false); |
708 GetPendingWallpaper(account_id, delayed)->ResetSetDefaultWallpaper(); | 710 GetPendingWallpaper(account_id, delayed)->ResetSetDefaultWallpaper(); |
709 if (base::SysInfo::IsRunningOnChromeOS()) { | 711 if (base::SysInfo::IsRunningOnChromeOS()) { |
710 LOG(ERROR) | 712 LOG(ERROR) |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 &stored_value)) { | 1156 &stored_value)) { |
1155 return wallpaper::WallpaperFilesId::FromString(stored_value); | 1157 return wallpaper::WallpaperFilesId::FromString(stored_value); |
1156 } | 1158 } |
1157 const std::string& old_id = account_id.GetUserEmail(); // Migrated | 1159 const std::string& old_id = account_id.GetUserEmail(); // Migrated |
1158 const wallpaper::WallpaperFilesId files_id = HashWallpaperFilesIdStr(old_id); | 1160 const wallpaper::WallpaperFilesId files_id = HashWallpaperFilesIdStr(old_id); |
1159 SetKnownUserWallpaperFilesId(account_id, files_id); | 1161 SetKnownUserWallpaperFilesId(account_id, files_id); |
1160 return files_id; | 1162 return files_id; |
1161 } | 1163 } |
1162 | 1164 |
1163 } // namespace chromeos | 1165 } // namespace chromeos |
OLD | NEW |