1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_BROWSING_DATA_CORE_PREF_NAMES_H_
#define COMPONENTS_BROWSING_DATA_CORE_PREF_NAMES_H_
#include "build/build_config.h"
namespace user_prefs {
class PrefRegistrySyncable;
}
class PrefService;
namespace browsing_data::prefs {
// JSON config to periodically delete some browsing data as specified by
// the BrowsingDataLifetime policy.
inline constexpr char kBrowsingDataLifetime[] =
"browser.clear_data.browsing_data_lifetime";
// Boolean set to true while browsing data needs to be deleted per
// ClearBrowsingDataOnExit policy.
// TODO (crbug/1026442): Consider setting this pref to true during fast
// shutdown if the ClearBrowsingDataOnExit policy is set.
inline constexpr char kClearBrowsingDataOnExitDeletionPending[] =
"browser.clear_data.clear_on_exit_pending";
// List of browsing data, specified by the ClearBrowsingDataOnExit policy, to
// delete just before browser shutdown.
inline constexpr char kClearBrowsingDataOnExitList[] =
"browser.clear_data.clear_on_exit";
// Clear browsing data deletion time period.
inline constexpr char kDeleteTimePeriod[] = "browser.clear_data.time_period";
inline constexpr char kDeleteTimePeriodBasic[] =
"browser.clear_data.time_period_basic";
// Clear Browsing Data dialog datatype preferences.
inline constexpr char kDeleteBrowsingHistory[] =
"browser.clear_data.browsing_history";
inline constexpr char kDeleteBrowsingHistoryBasic[] =
"browser.clear_data.browsing_history_basic";
inline constexpr char kDeleteDownloadHistory[] =
"browser.clear_data.download_history";
inline constexpr char kDeleteCache[] = "browser.clear_data.cache";
inline constexpr char kDeleteCacheBasic[] = "browser.clear_data.cache_basic";
inline constexpr char kDeleteCookies[] = "browser.clear_data.cookies";
inline constexpr char kDeleteCookiesBasic[] =
"browser.clear_data.cookies_basic";
inline constexpr char kDeletePasswords[] = "browser.clear_data.passwords";
inline constexpr char kDeleteFormData[] = "browser.clear_data.form_data";
inline constexpr char kDeleteHostedAppsData[] =
"browser.clear_data.hosted_apps_data";
inline constexpr char kDeleteSiteSettings[] =
"browser.clear_data.site_settings";
inline constexpr char kCloseTabs[] = "browser.clear_data.close_tabs";
// Other Clear Browsing Data preferences.
inline constexpr char kLastClearBrowsingDataTime[] =
"browser.last_clear_browsing_data_time";
inline constexpr char kClearBrowsingDataHistoryNoticeShownTimes[] =
"browser.clear_data.history_notice_shown_times";
inline constexpr char kLastClearBrowsingDataTab[] =
"browser.last_clear_browsing_data_tab";
inline constexpr char kMigratedToQuickDeletePrefValues[] =
"browser.migrated_to_quick_delete_pref_values";
// Registers the Clear Browsing Data UI prefs.
void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry);
#if BUILDFLAG(IS_IOS)
// Migrates the values of the time period and tabs prefs to the new defaults for
// Quick Delete. For users who have previously changed their time period pref
// from the default value, then that value is still kept. If the migration has
// already happened, then no-op.
// TODO(crbug.com/335387869): When MaybeMigrateToQuickDeletePrefValues is
// removed, set default value in iOS for the `kDeleteTimePeriod` pref to 15
// minutes.
void MaybeMigrateToQuickDeletePrefValues(PrefService* pref_service);
#endif // BUILDFLAG(IS_IOS)
} // namespace browsing_data::prefs
#endif // COMPONENTS_BROWSING_DATA_CORE_PREF_NAMES_H_
|