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

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

Issue 9225053: Add a blocking version of the sync promo dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 11 months 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_ui.cc
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
index 6545bdfadfde61aae1819496f42cd4fd7a42be53..0d19b131c15689d26c98f8dfeb6b8c3202fd2dd2 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc
@@ -295,14 +295,17 @@ bool SyncPromoUI::UserHasSeenSyncPromoAtStartup(Profile* profile) {
}
// static
-int SyncPromoUI::GetSyncPromoVersion() {
- int version = 0;
+SyncPromoUI::Version SyncPromoUI::GetSyncPromoVersion() {
+ int value = 0;
if (base::StringToInt(CommandLine::ForCurrentProcess()->
- GetSwitchValueASCII(switches::kSyncPromoVersion), &version)) {
- return version;
+ GetSwitchValueASCII(switches::kSyncPromoVersion), &value)) {
+ if (value >= VERSION_DEFAULT && value < VERSION_COUNT)
Dan Beam 2012/01/30 18:10:05 convert to 1 if?
sail 2012/01/30 21:52:36 At 3 lines it's getting hard for me to follow
Dan Beam 2012/01/31 00:31:39 Fine.
+ return static_cast<Version>(value);
}
+
+ Version version;
if (sync_promo_trial::GetSyncPromoVersionForCurrentTrial(&version))
return version;
- // Default promo version is 0.
- return 0;
+
+ return VERSION_DEFAULT;
}

Powered by Google App Engine
This is Rietveld 408576698