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

Unified Diff: chrome/browser/chromeos/extensions/wallpaper_api.cc

Issue 1497973002: This CL replaces e-mail with AccountId in wallpaper manager code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 years 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/extensions/wallpaper_api.cc
diff --git a/chrome/browser/chromeos/extensions/wallpaper_api.cc b/chrome/browser/chromeos/extensions/wallpaper_api.cc
index 349c72b3a90360f386264e0b21ec7346fa87f025..b8293a9399cc1795bc20531a73ab7afb2af00d5b 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_api.cc
@@ -104,8 +104,9 @@ bool WallpaperSetWallpaperFunction::RunAsync() {
params_ = set_wallpaper::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_);
- // Gets email address and username hash while at UI thread.
- user_id_ = user_manager::UserManager::Get()->GetLoggedInUser()->email();
+ // Gets account id and username hash while at UI thread.
+ account_id_ =
+ user_manager::UserManager::Get()->GetLoggedInUser()->GetAccountId();
user_id_hash_ =
user_manager::UserManager::Get()->GetLoggedInUser()->username_hash();
@@ -144,14 +145,11 @@ void WallpaperSetWallpaperFunction::OnWallpaperDecoded(
wallpaper_api_util::RecordCustomWallpaperLayout(layout);
bool update_wallpaper =
- user_id_ == user_manager::UserManager::Get()->GetActiveUser()->email();
- wallpaper_manager->SetCustomWallpaper(user_id_,
- user_id_hash_,
- params_->details.filename,
- layout,
- user_manager::User::CUSTOMIZED,
- image,
- update_wallpaper);
+ account_id_ ==
+ user_manager::UserManager::Get()->GetActiveUser()->GetAccountId();
+ wallpaper_manager->SetCustomWallpaper(
+ account_id_, user_id_hash_, params_->details.filename, layout,
+ user_manager::User::CUSTOMIZED, image, update_wallpaper);
unsafe_wallpaper_decoder_ = NULL;
if (params_->details.thumbnail) {
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_api.h ('k') | chrome/browser/chromeos/extensions/wallpaper_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698