| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h" |
| 6 |
| 7 #include "components/pref_registry/pref_registry_syncable.h" |
| 8 #include "components/prefs/pref_service.h" |
| 9 #include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h
" |
| 10 #include "ios/chrome/browser/pref_names.h" |
| 11 |
| 12 DesktopPromotionSyncService::DesktopPromotionSyncService( |
| 13 PrefService* pref_service, |
| 14 browser_sync::ProfileSyncService* sync_service) |
| 15 : observer_(pref_service, sync_service) {} |
| 16 |
| 17 DesktopPromotionSyncService::~DesktopPromotionSyncService() = default; |
| 18 |
| 19 // static |
| 20 void DesktopPromotionSyncService::RegisterDesktopPromotionUserPrefs( |
| 21 user_prefs::PrefRegistrySyncable* registry) { |
| 22 registry->RegisterIntegerPref( |
| 23 prefs::kDesktopIOSPromotionSMSEntryPoint, 0, |
| 24 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| 25 registry->RegisterIntegerPref( |
| 26 prefs::kDesktopIOSPromotionShownEntryPoints, 0, |
| 27 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| 28 registry->RegisterDoublePref( |
| 29 prefs::kDesktopIOSPromotionLastImpression, 0, |
| 30 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| 31 registry->RegisterBooleanPref( |
| 32 prefs::kDesktopIOSPromotionDone, false, |
| 33 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
| 34 } |
| OLD | NEW |