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

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Update after review. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
index 89e9363b8df7a34a101929266cd49b19f30cd0ea..2bbe0ae9359a89f0cf39638d3c314ca69b73a65b 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -42,6 +42,7 @@
#include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/login/user_names.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user.h"
#include "components/user_manager/user_image/user_image.h"
#include "components/user_manager/user_manager.h"
@@ -477,12 +478,12 @@ void WallpaperManager::SetCustomWallpaper(
return;
}
- const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_id);
+ const user_manager::User* user = user_manager::UserManager::Get()->FindUser(
+ AccountId::FromUserEmail(user_id));
CHECK(user);
bool is_persistent =
achuithb 2015/10/28 23:11:46 const
Alexander Alekseev 2015/10/29 02:00:41 Done.
!user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral(
- user_id) ||
+ AccountId::FromUserEmail(user_id)) ||
(type == user_manager::User::POLICY &&
user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT);
@@ -555,8 +556,8 @@ void WallpaperManager::DoSetDefaultWallpaper(
const base::FilePath* file = NULL;
- const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_id);
+ const user_manager::User* user = user_manager::UserManager::Get()->FindUser(
+ AccountId::FromUserEmail(user_id));
if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) {
file =
@@ -623,8 +624,9 @@ void WallpaperManager::ScheduleSetUserWallpaper(const std::string& user_id,
return;
}
+ const AccountId account_id = AccountId::FromUserEmail(user_id);
const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_id);
+ user_manager::UserManager::Get()->FindUser(account_id);
// User is unknown or there is no visible background in kiosk mode.
if (!user || user->GetType() == user_manager::USER_TYPE_KIOSK_APP)
@@ -632,7 +634,7 @@ void WallpaperManager::ScheduleSetUserWallpaper(const std::string& user_id,
// Guest user or regular user in ephemeral mode.
if ((user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral(
- user_id) &&
+ account_id) &&
user->HasGaiaAccount()) ||
user->GetType() == user_manager::USER_TYPE_GUEST) {
InitInitialUserWallpaper(user_id, false);
@@ -809,7 +811,7 @@ bool WallpaperManager::GetUserWallpaperInfo(const std::string& user_id,
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral(
- user_id)) {
+ AccountId::FromUserEmail(user_id))) {
// Default to the values cached in memory.
*info = current_user_wallpaper_info_;

Powered by Google App Engine
This is Rietveld 408576698