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

Unified Diff: chrome/browser/ui/webui/sync_promo_ui.cc

Issue 8933003: [Sync Promo UI] Changing sync promo to honor brand codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some code review comments 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_ui.cc
diff --git a/chrome/browser/ui/webui/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo_ui.cc
index 756aeb93b6e23133d3f4b7794e9e39b6aa8c221d..b25be94d46b31af6466c047bdfd62677a5a1e4bb 100644
--- a/chrome/browser/ui/webui/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo_ui.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/options/core_options_handler.h"
#include "chrome/browser/ui/webui/sync_promo_handler.h"
+#include "chrome/browser/ui/webui/sync_promo_trial.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -183,6 +184,15 @@ bool SyncPromoUI::ShouldShowSyncPromoAtStartup(Profile* profile,
if (show_count >= kSyncPromoShowAtStartupMaximum)
return false;
+ // If the current install has a brand code that's part of an experiment, honor
+ // that before master prefs.
+ if (sync_promo_trial::IsPartOfBrandTrialToEnable()) {
+ bool should_show = sync_promo_trial::ShouldShowAtStartupBasedOnBrand();
+ if (should_show)
+ sync_promo_trial::RecordUserShownPromoWithTrialBrand();
+ return should_show;
+ }
+
// This pref can be set in the master preferences file to allow or disallow
// showing the sync promo at startup.
if (prefs->HasPrefPath(prefs::kSyncPromoShowOnFirstRunAllowed))
« chrome/browser/ui/webui/sync_promo_trial.cc ('K') | « chrome/browser/ui/webui/sync_promo_trial.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698