Index: chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc |
diff --git a/chrome/browser/ui/webui/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc |
similarity index 95% |
rename from chrome/browser/ui/webui/sync_promo_handler.cc |
rename to chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc |
index c2fb5689ecfafa0fcd87b0e252acccd1d541c37f..7be0cb00ca521868562414a45f95160fa0eff2f8 100644 |
--- a/chrome/browser/ui/webui/sync_promo_handler.cc |
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/ui/webui/sync_promo_handler.h" |
+#include "chrome/browser/ui/webui/sync_promo/sync_promo_handler.h" |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
@@ -15,8 +15,8 @@ |
#include "chrome/browser/tabs/tab_strip_model.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_list.h" |
-#include "chrome/browser/ui/webui/sync_promo_trial.h" |
-#include "chrome/browser/ui/webui/sync_promo_ui.h" |
+#include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" |
+#include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension_constants.h" |
#include "chrome/common/pref_names.h" |
@@ -57,6 +57,13 @@ 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) |
@@ -122,16 +129,12 @@ void SyncPromoHandler::RegisterMessages() { |
} |
void SyncPromoHandler::ShowGaiaSuccessAndClose() { |
- if (sync_promo_trial::IsExperimentActive()) |
- sync_promo_trial::RecordUserSignedIn(); |
- |
+ RecordExperimentOutcomesOnSignIn(); |
SyncSetupHandler::ShowGaiaSuccessAndClose(); |
} |
void SyncPromoHandler::ShowGaiaSuccessAndSettingUp() { |
- if (sync_promo_trial::IsExperimentActive()) |
- sync_promo_trial::RecordUserSignedIn(); |
- |
+ RecordExperimentOutcomesOnSignIn(); |
SyncSetupHandler::ShowGaiaSuccessAndSettingUp(); |
} |
@@ -273,7 +276,7 @@ int SyncPromoHandler::GetViewCount() const { |
return prefs_->GetInteger(prefs::kSyncPromoViewCount); |
} |
-int SyncPromoHandler::IncrementViewCountBy(unsigned int amount) { |
+int SyncPromoHandler::IncrementViewCountBy(size_t amount) { |
// Let the user increment by 0 if they really want. It might be useful for a |
// weird way of sending preference change notifications... |
int adjusted = GetViewCount() + amount; |