| 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..010957ebca4171a5c8750c312fdf308fe48c7001 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,11 @@ 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();
|
| + std::string username =
|
| + name.empty() ? name : gaia::SanitizeEmail(gaia::CanonicalizeEmail(name));
|
| + values->SetString("username", username);
|
| #endif
|
|
|
| // Pass along sync status early so it will be available during page init.
|
|
|