Chromium Code Reviews| 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; |
| } |