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

Unified Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc

Issue 169993002: Add check for user in cros settings handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert to patchset 1 Created 6 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
index 372ba6f8f5798bfd696bad3601554724ed021ffe..9fb89b1bdb04724485fb857431235a89ec22cd8c 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
@@ -394,8 +394,8 @@ void CrosLanguageOptionsHandler::SetApplicationLocale(
UserManager* user_manager = UserManager::Get();
// Only the primary user can change the locale.
- if (user_manager->GetUserByProfile(profile)->email() ==
- user_manager->GetPrimaryUser()->email()) {
+ User* user = user_manager->GetUserByProfile(profile);
+ if (user && user->email() == user_manager->GetPrimaryUser()->email()) {
profile->ChangeAppLocale(language_code,
Profile::APP_LOCALE_CHANGED_VIA_SETTINGS);
}
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698