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

Unified Diff: chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc

Issue 9007041: [Sync Promo UI] Change data reporting to differentiate between startup and other (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/sync_promo/sync_promo_handler.cc
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
index 136c5079c6530f66c6520b0f03759fd039636b3e..9a9a0678c4f578f80c9e41206b446121e107afc5 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
@@ -57,13 +57,6 @@ static bool IsValidUserFlowAction(int action) {
action == SYNC_PROMO_LEFT_DURING_THROBBER;
}
-static void RecordExperimentOutcomesOnSignIn() {
- if (sync_promo_trial::IsExperimentActive())
- sync_promo_trial::RecordUserSignedIn();
- if (sync_promo_trial::IsPartOfBrandTrialToEnable())
- sync_promo_trial::RecordUserSignedInWithTrialBrand();
-}
-
} // namespace
SyncPromoHandler::SyncPromoHandler(ProfileManager* profile_manager)
@@ -287,6 +280,17 @@ int SyncPromoHandler::IncrementViewCountBy(size_t amount) {
return adjusted;
}
+void SyncPromoHandler::RecordExperimentOutcomesOnSignIn() {
+ if (sync_promo_trial::IsExperimentActive())
+ sync_promo_trial::RecordUserSignedIn();
+ if (sync_promo_trial::IsPartOfBrandTrialToEnable()) {
+ bool is_start_up = SyncPromoUI::GetIsLaunchPageForSyncPromoURL(
+ web_ui_->tab_contents()->GetURL());
+ Profile* profile = Profile::FromWebUI(web_ui_);
+ sync_promo_trial::RecordUserSignedInWithTrialBrand(is_start_up, profile);
+ }
+}
+
void SyncPromoHandler::RecordUserFlowAction(int action) {
// Send an enumeration to our single user flow histogram.
UMA_HISTOGRAM_ENUMERATION("SyncPromo.UserFlow", action,
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_handler.h ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698