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

Unified Diff: components/wallpaper/wallpaper_manager_base.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
« components/user_manager/user_manager_base.cc ('K') | « components/wallpaper/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wallpaper/wallpaper_manager_base.cc
diff --git a/components/wallpaper/wallpaper_manager_base.cc b/components/wallpaper/wallpaper_manager_base.cc
index 3e0b014eca98e714f0cc948906aaf64a9e20632e..96f8dfcaa28729d4f66ba732f91f2ca1f7255ca4 100644
--- a/components/wallpaper/wallpaper_manager_base.cc
+++ b/components/wallpaper/wallpaper_manager_base.cc
@@ -27,6 +27,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"
@@ -500,8 +501,8 @@ WallpaperManagerBase::~WallpaperManagerBase() {
void WallpaperManagerBase::SetPolicyControlledWallpaper(
const std::string& user_id,
const user_manager::UserImage& user_image) {
- 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) {
NOTREACHED() << "Unknown user.";
return;
@@ -885,7 +886,7 @@ void WallpaperManagerBase::MoveCustomWallpapersSuccess(
info.location = base::FilePath(user_id_hash).Append(info.location).value();
bool is_persistent =
!user_manager::UserManager::Get()->IsUserNonCryptohomeDataEphemeral(
- user_id);
+ AccountId::FromUserEmail(user_id));
SetUserWallpaperInfo(user_id, info, is_persistent);
}
}
« components/user_manager/user_manager_base.cc ('K') | « components/wallpaper/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698