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

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

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 11 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: 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 a8bac25a9401fad7c6c034bb58bc5d401402ba05..ab788a1e6010a5d9ca332270efaa3f75ac4767f1 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -136,7 +136,7 @@ void NTPLoginHandler::HandleShowSyncLoginUI(const ListValue* args) {
#if !defined(OS_ANDROID)
// The user isn't signed in, show the sync promo.
if (SyncPromoUI::ShouldShowSyncPromo(profile)) {
- chrome::ShowSyncSetup(browser, SyncPromoUI::SOURCE_NTP_LINK);
+ chrome::ShowBrowserSignin(browser, SyncPromoUI::SOURCE_NTP_LINK);
RecordInHistogram(NTP_SIGN_IN_PROMO_CLICKED);
}
#endif
@@ -187,7 +187,7 @@ void NTPLoginHandler::HandleShowAdvancedLoginUI(const ListValue* args) {
Browser* browser =
chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
if (browser)
- chrome::ShowSyncSetup(browser, SyncPromoUI::SOURCE_NTP_LINK);
+ chrome::ShowBrowserSignin(browser, SyncPromoUI::SOURCE_NTP_LINK);
}
void NTPLoginHandler::UpdateLogin() {
@@ -250,10 +250,7 @@ bool NTPLoginHandler::ShouldShow(Profile* profile) {
// UI and the avatar menu don't exist on that platform.
return false;
#else
- if (profile->IsOffTheRecord())
- return false;
-
- return profile->GetOriginalProfile()->IsSyncAccessible();
+ return !profile->IsOffTheRecord();
#endif
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698