| 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; |
| 701 | 702 |
| 702 // Guest user or regular user in ephemeral mode. | 703 // Guest user or regular user in ephemeral mode. |
| 703 if ((user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral( | 704 if ((user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral( |
| 704 account_id) && | 705 account_id) && |
| 705 user->HasGaiaAccount()) || | 706 user->HasGaiaAccount()) || |
| 706 user->GetType() == user_manager::USER_TYPE_GUEST) { | 707 user->GetType() == user_manager::USER_TYPE_GUEST) { |
| 707 InitInitialUserWallpaper(account_id, false); | 708 InitInitialUserWallpaper(account_id, false); |
| 708 GetPendingWallpaper(account_id, delayed)->ResetSetDefaultWallpaper(); | 709 GetPendingWallpaper(account_id, delayed)->ResetSetDefaultWallpaper(); |
| 709 if (base::SysInfo::IsRunningOnChromeOS()) { | 710 if (base::SysInfo::IsRunningOnChromeOS()) { |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 &stored_value)) { | 1155 &stored_value)) { |
| 1155 return wallpaper::WallpaperFilesId::FromString(stored_value); | 1156 return wallpaper::WallpaperFilesId::FromString(stored_value); |
| 1156 } | 1157 } |
| 1157 const std::string& old_id = account_id.GetUserEmail(); // Migrated | 1158 const std::string& old_id = account_id.GetUserEmail(); // Migrated |
| 1158 const wallpaper::WallpaperFilesId files_id = HashWallpaperFilesIdStr(old_id); | 1159 const wallpaper::WallpaperFilesId files_id = HashWallpaperFilesIdStr(old_id); |
| 1159 SetKnownUserWallpaperFilesId(account_id, files_id); | 1160 SetKnownUserWallpaperFilesId(account_id, files_id); |
| 1160 return files_id; | 1161 return files_id; |
| 1161 } | 1162 } |
| 1162 | 1163 |
| 1163 } // namespace chromeos | 1164 } // namespace chromeos |
| OLD | NEW |