Chromium Code Reviews| Index: ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.mm |
| diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.mm b/ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2447bfdc68fe169d379a1b966bddfe83f73f0922 |
| --- /dev/null |
| +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.mm |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.h" |
| + |
| +#include "components/pref_registry/pref_registry_syncable.h" |
| +#include "components/prefs/pref_service.h" |
| + |
| +namespace prefs { |
| + |
| +// Which desktop ios promotion initiated sent the sms. |
|
rohitrao (ping after 24h)
2017/01/23 20:31:39
Typo: "initiated sent"
mrefaat
2017/01/24 19:57:20
Acknowledged.
|
| +const char kDesktopIOSPromotionSMSEntryPoint[] = |
| + "ios.desktop_ios_promo_sms_entrypoint"; |
| + |
| +// Which desktop ios promotions did the user see. |
| +const char kDesktopIOSPromotionTargetedEntryPoints[] = |
| + "ios.desktop_ios_promo_targeted_entrypoints"; |
| + |
| +// Last desktop ios promotion impression (If sms was sent it's the time of |
| +// sending the sms). |
| +const char kDesktopIOSPromotionLastImpression[] = |
| + "ios.desktop_ios_promo_last_impression"; |
| + |
| +// This is true when the user see the promotion, get sms, install and sign into |
| +// chrome ios. |
| +const char kDesktopIOSPromotionDone[] = "ios.desktop_ios_promo_done"; |
| + |
| +} // namespace prefs |
| + |
| +namespace desktop_ios_promotion { |
| + |
| +void RegisterDesktopPromotionUserPrefs( |
| + user_prefs::PrefRegistrySyncable* registry) { |
| + registry->RegisterIntegerPref( |
| + prefs::kDesktopIOSPromotionSMSEntryPoint, 0, |
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| + registry->RegisterIntegerPref( |
| + prefs::kDesktopIOSPromotionTargetedEntryPoints, 0, |
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| + registry->RegisterDoublePref( |
| + prefs::kDesktopIOSPromotionLastImpression, 0, |
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| + registry->RegisterBooleanPref( |
| + prefs::kDesktopIOSPromotionDone, false, |
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| +} |
| + |
| +} // namespace desktop_ios_promotion |