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

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

Issue 12477009: With browser instant extended enabled, signing in should redirect to chrome://apps instead of to NT… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a new SyncPromoUI::Source for Apps page signin. Created 7 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
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 c5f260b1f2a0a6614d98beecb1da73467b73f8d2..73fd45b1969281f1e872aeb0ca31e0997d340bde 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -142,7 +142,10 @@ 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::ShowBrowserSignin(browser, SyncPromoUI::SOURCE_NTP_LINK);
+ SyncPromoUI::Source source =
+ (web_contents->GetURL().spec() == chrome::kChromeUIAppsURL) ?
+ SyncPromoUI::SOURCE_APPS_PAGE_LINK : SyncPromoUI::SOURCE_NTP_LINK;
+ chrome::ShowBrowserSignin(browser, source);
RecordInHistogram(NTP_SIGN_IN_PROMO_CLICKED);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698