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 f8840fa21a5e6ebc02fd6492051c0b879f3ef662..bb307f75c5cc3785423226408a6af9d998f4ac00 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -80,6 +80,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_view.h" |
#include "content/public/common/page_zoom.h" |
+#include "google_apis/gaia/gaia_auth_util.h" |
#include "google_apis/gaia/google_service_auth_error.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
@@ -467,8 +468,10 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) { |
l10n_util::GetStringFUTF16(IDS_SEARCH_PREF_EXPLANATION, omnibox_url)); |
#if defined(OS_CHROMEOS) |
- const chromeos::User* user = chromeos::UserManager::Get()->GetLoggedInUser(); |
- values->SetString("username", user ? user->email() : std::string()); |
+ Profile* profile = Profile::FromWebUI(web_ui()); |
+ std::string name = profile->GetProfileName(); |
+ values->SetString("username", name.empty() ? name : |
James Hawkins
2013/11/05 18:51:44
Optional nit: Might be more readable to the latter
Mr4D (OOO till 08-26)
2013/11/05 19:07:08
Not quite sure if it is better readable, but done.
|
+ gaia::SanitizeEmail(gaia::CanonicalizeEmail(name))); |
#endif |
// Pass along sync status early so it will be available during page init. |