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

Unified Diff: chrome/browser/ui/webui/sync_promo/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: removing supposedly needless .gypi deps 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
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_ui.h ('k') | chrome/browser/ui/webui/sync_promo_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
diff --git a/chrome/browser/ui/webui/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
similarity index 94%
rename from chrome/browser/ui/webui/sync_promo_ui.cc
rename to chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
index 756aeb93b6e23133d3f4b7794e9e39b6aa8c221d..6c809c4ac6329b05cebd03b11ba8820f1f3eacf1 100644
--- a/chrome/browser/ui/webui/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.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_ui.h"
+#include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
#include "base/command_line.h"
#include "base/utf_string_conversions.h"
@@ -15,7 +15,8 @@
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#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/sync_promo_handler.h"
+#include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -121,6 +122,9 @@ SyncPromoUI::SyncPromoUI(TabContents* contents) : ChromeWebUI(contents) {
html_source->add_resource_path(kSyncPromoJsFile, IDR_SYNC_PROMO_JS);
html_source->set_default_resource(IDR_SYNC_PROMO_HTML);
profile->GetChromeURLDataManager()->AddDataSource(html_source);
+
+ if (sync_promo_trial::IsPartOfBrandTrialToEnable())
+ sync_promo_trial::RecordUserShownPromoWithTrialBrand();
}
// static
@@ -183,6 +187,11 @@ 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())
+ return sync_promo_trial::ShouldShowAtStartupBasedOnBrand();
+
// 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))
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_ui.h ('k') | chrome/browser/ui/webui/sync_promo_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698