summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/sync/one_click_signin_helper.cc6
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.cc5
-rw-r--r--chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc12
-rw-r--r--chrome/browser/ui/webui/sync_promo/sync_promo_ui.h1
4 files changed, 20 insertions, 4 deletions
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index f2cee27..5e8ae9e 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -164,6 +164,10 @@ void LogHistogramValue(SyncPromoUI::Source source, int action) {
UMA_HISTOGRAM_ENUMERATION("Signin.AppLauncherActions", action,
one_click_signin::HISTOGRAM_MAX);
break;
+ case SyncPromoUI::SOURCE_APPS_PAGE_LINK:
+ UMA_HISTOGRAM_ENUMERATION("Signin.AppsPageLinkActions", action,
+ one_click_signin::HISTOGRAM_MAX);
+ break;
default:
NOTREACHED() << "Invalid Source";
return;
@@ -887,7 +891,7 @@ void OneClickSigninHelper::RedirectToNtpOrAppsPage(bool show_bubble) {
// Redirect to NTP/Apps page and display a confirmation bubble
content::WebContents* contents = web_contents();
- GURL url(chrome::IsInstantExtendedAPIEnabled() ?
+ GURL url(source_ == SyncPromoUI::SOURCE_APPS_PAGE_LINK ?
chrome::kChromeUIAppsURL : chrome::kChromeUINewTabURL);
content::OpenURLParams params(url,
content::Referrer(),
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index c5f260b..73fd45b 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
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
index 1b49c0c..14517a7 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc
@@ -29,6 +29,8 @@ enum {
UMA_WEBSTORE_INSTALL_SIGNED_IN,
UMA_APP_LAUNCHER_SHOWN,
UMA_APP_LAUNCHER_SIGNED_IN,
+ UMA_APPS_PAGE_LINK_SHOWN,
+ UMA_APPS_PAGE_LINK_SIGNED_IN,
UMA_MAX,
};
@@ -62,6 +64,9 @@ void RecordUserShownPromo(content::WebUI* web_ui) {
case SyncPromoUI::SOURCE_APP_LAUNCHER:
uma = UMA_APP_LAUNCHER_SHOWN;
break;
+ case SyncPromoUI::SOURCE_APPS_PAGE_LINK:
+ uma = UMA_APPS_PAGE_LINK_SHOWN;
+ break;
case SyncPromoUI::SOURCE_UNKNOWN:
uma = UMA_UNKNOWN_SHOWN;
break;
@@ -69,7 +74,7 @@ void RecordUserShownPromo(content::WebUI* web_ui) {
// If this assert hits, then the SyncPromoUI::Source enum has changed and
// the UMA enum above, this switch statement and histograms.xml all need
// to be updated to reflect that.
- COMPILE_ASSERT(SyncPromoUI::SOURCE_UNKNOWN == 7,
+ COMPILE_ASSERT(SyncPromoUI::SOURCE_UNKNOWN == 8,
kSourceEnumHasChangedButNotThisSwitchStatement);
NOTREACHED();
break;
@@ -103,12 +108,15 @@ void RecordUserSignedIn(content::WebUI* web_ui) {
case SyncPromoUI::SOURCE_APP_LAUNCHER:
uma = UMA_APP_LAUNCHER_SIGNED_IN;
break;
+ case SyncPromoUI::SOURCE_APPS_PAGE_LINK:
+ uma = UMA_APPS_PAGE_LINK_SIGNED_IN;
+ break;
case SyncPromoUI::SOURCE_UNKNOWN:
uma = UMA_UNKNOWN_SIGNED_IN;
break;
default:
// This switch statement needs to be updated when the enum Source changes.
- COMPILE_ASSERT(SyncPromoUI::SOURCE_UNKNOWN == 7,
+ COMPILE_ASSERT(SyncPromoUI::SOURCE_UNKNOWN == 8,
kSourceEnumHasChangedButNotThisSwitchStatement);
NOTREACHED();
break;
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.h b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.h
index 2dc281f..d441d02 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.h
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.h
@@ -22,6 +22,7 @@ class SyncPromoUI : public content::WebUIController {
SOURCE_EXTENSION_INSTALL_BUBBLE,
SOURCE_WEBSTORE_INSTALL,
SOURCE_APP_LAUNCHER,
+ SOURCE_APPS_PAGE_LINK,
SOURCE_UNKNOWN, // This must be last.
};