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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 68df1d0e137e7096512ce6348e1254dc52ff2062..45196da88100becac29587ff114ccc5b962b5ed6 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -547,7 +547,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
if (user && (user->GetType() != user_manager::USER_TYPE_GUEST))
- username = user->email();
+ username = user->GetUserID().GetUserEmail();
}
if (!username.empty())
username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username));
@@ -1031,7 +1031,7 @@ void BrowserOptionsHandler::InitializePage() {
OnWallpaperManagedChanged(
chromeos::WallpaperManager::Get()->IsPolicyControlled(
- user_manager::UserManager::Get()->GetActiveUser()->email()));
+ user_manager::UserManager::Get()->GetActiveUser()->GetUserID()));
policy::ConsumerManagementService* consumer_management =
g_browser_process->platform_part()->browser_policy_connector_chromeos()->
@@ -1443,7 +1443,7 @@ void BrowserOptionsHandler::ThemesSetNative(const base::ListValue* args) {
#if defined(OS_CHROMEOS)
void BrowserOptionsHandler::UpdateAccountPicture() {
std::string email =
- user_manager::UserManager::Get()->GetLoggedInUser()->email();
+ user_manager::UserManager::Get()->GetLoggedInUser()->GetUserID().GetUserEmail();
if (!email.empty()) {
web_ui()->CallJavascriptFunction("BrowserOptions.updateAccountPicture");
base::StringValue email_value(email);

Powered by Google App Engine
This is Rietveld 408576698