1 // Copyright 2020 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 "chrome/browser/chromeos/full_restore/full_restore_prefs.h" 6 7 #include "ash/public/cpp/ash_features.h" 8 #include "components/pref_registry/pref_registry_syncable.h" 9 #include "components/prefs/pref_registry_simple.h" 10 11 namespace chromeos { 12 namespace full_restore { 13 14 // An integer pref to define whether restore apps and web pages on startup. 15 // Refer to |RestoreOption|. 16 const char kRestoreAppsAndPagesPrefName[] = "settings.restore_apps_and_pages"; 17 18 // TODO(https://crbug.com/1131969): Add the restore user preference init, and 19 // modificaiton implementation. 20 RegisterProfilePrefs(PrefRegistrySimple * registry)21void RegisterProfilePrefs(PrefRegistrySimple* registry) { 22 if (ash::features::IsFullRestoreEnabled()) { 23 registry->RegisterIntegerPref( 24 kRestoreAppsAndPagesPrefName, static_cast<int>(RestoreOption::kAlways), 25 user_prefs::PrefRegistrySyncable::SYNCABLE_OS_PREF); 26 } 27 } 28 29 } // namespace full_restore 30 } // namespace chromeos 31