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

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

Issue 2471993002: Remove calls to User::email() from chrome/browser/ui/webui/* (Closed)
Patch Set: Created 4 years, 1 month 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 9f908061ec2a2ecdf1ba4a2d9f0d06c79603a953..e1cf649f822f1319054fd64622dc072cc839bf87 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -600,7 +600,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->GetAccountId().GetUserEmail();
}
if (!username.empty())
username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username));
@@ -1463,8 +1463,10 @@ void BrowserOptionsHandler::ThemesSetNative(const base::ListValue* args) {
#if defined(OS_CHROMEOS)
void BrowserOptionsHandler::UpdateAccountPicture() {
- std::string email =
- user_manager::UserManager::Get()->GetLoggedInUser()->email();
+ std::string email = user_manager::UserManager::Get()
+ ->GetLoggedInUser()
+ ->GetAccountId()
+ .GetUserEmail();
if (!email.empty()) {
web_ui()->CallJavascriptFunctionUnsafe(
"BrowserOptions.updateAccountPicture");

Powered by Google App Engine
This is Rietveld 408576698