File: pref_names.h

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (86 lines) | stat: -rw-r--r-- 3,652 bytes parent folder | download | duplicates (6)
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_