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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_login_handler.cc

Issue 1013463004: NTP checks for guest sessions before updating the login bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Because ChromeOS Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index c53b1ba7873a880000f211d1f8102d4f53c46b1e..001e7e995caecce4994ab1e37686314a69627f0d 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -173,8 +173,14 @@ void NTPLoginHandler::HandleShowAdvancedLoginUI(const base::ListValue* args) {
void NTPLoginHandler::UpdateLogin() {
Profile* profile = Profile::FromWebUI(web_ui());
- std::string username =
- SigninManagerFactory::GetForProfile(profile)->GetAuthenticatedUsername();
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
+ if (!signin_manager) {
+ // Guests on desktop do not have a signin manager.
+ return;
+ }
+
+ std::string username = signin_manager->GetAuthenticatedUsername();
base::string16 header, sub_header;
std::string icon_url;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698