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

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

Issue 264543002: Revert 267095 "Remove WebUI NTP on Android." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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
Index: trunk/src/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
===================================================================
--- trunk/src/chrome/browser/ui/webui/ntp/ntp_login_handler.cc (revision 267099)
+++ trunk/src/chrome/browser/ui/webui/ntp/ntp_login_handler.cc (working copy)
@@ -132,6 +132,7 @@
return;
if (username.empty()) {
+#if !defined(OS_ANDROID)
// The user isn't signed in, show the sign in promo.
if (signin::ShouldShowPromo(profile)) {
signin::Source source =
@@ -141,6 +142,7 @@
chrome::ShowBrowserSignin(browser, source);
RecordInHistogram(NTP_SIGN_IN_PROMO_CLICKED);
}
+#endif
} else if (args->GetSize() == 4) {
// The user is signed in, show the profiles menu.
double x = 0;
@@ -221,8 +223,12 @@
}
}
} else {
-#if !defined(OS_CHROMEOS)
- // Chromeos does not show this status header.
+#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+ // Android uses a custom sign in promo. Don't call the function
+ // signin::ShouldShowPromo() since it does a bunch of checks that are not
+ // required here. We only want to suppress this login status for users that
+ // are not allowed to sign in. Chromeos does not show this status header
+ // at all.
SigninManager* signin = SigninManagerFactory::GetForProfile(
profile->GetOriginalProfile());
if (!profile->IsManaged() && signin->IsSigninAllowed()) {
« no previous file with comments | « trunk/src/chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | trunk/src/chrome/browser/ui/webui/ntp/ntp_resource_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698