Commit 4b2f488e authored by pam@chromium.org's avatar pam@chromium.org

Add a policy and pref to control whether deleting browsing and download history is allowed.

The policy is currently disabled (by saying that it is supported on no platforms), pending a UI treatment that allows users to know when deleting browsing history is prohibited.

TBR=rlp@chromium.org

BUG=175419

Review URL: https://chromiumcodereview.appspot.com/12209091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182233 0039d316-1c4b-4281-b951-d872f2087c98
parent d28f8a20
......@@ -112,7 +112,7 @@
# persistent IDs for all fields (but not for groups!) are needed. These are
# specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs,
# because doing so would break the deployed wire format!
# For your editing convenience: highest ID currently used: 186
# For your editing convenience: highest ID currently used: 187
#
# Placeholders:
# The following placeholder strings are automatically substituted:
......@@ -436,6 +436,31 @@
If this setting is disabled or not set, browsing history is saved.''',
},
{
'name': 'AllowDeletingBrowserHistory',
'future': True,
'type': 'main',
'schema': { 'type': 'boolean' },
# TODO(pamg): Restore the correct 'supported' line when the UI properly
# shows that deleting browser history is disabled. Also fix the 'os' line
# in policy_test_cases.json.
# 'supported_on': ['chrome.*:27-', 'chrome_os:0.27-'],
'supported_on': [],
'features': {
'dynamic_refresh': True,
'per_profile': True,
},
'example_value': True,
'id': 187,
'caption': '''Enable deleting browser and download history''',
'desc': '''Enables deleting browser history and download history in <ph name="PRODUCT_NAME">$<ex>Google Chrome</ex></ph> and prevents users from changing this setting.
Note that even with this policy disabled, the browsing and download history are not guaranteed to be retained: users may be able to edit or delete the history database files directly, and the browser itself may expire or archive any or all history items at any time.
If this setting is enabled or not set, browsing and download history can be deleted.
If this setting is disabled, browsing and download history cannot be deleted.''',
},
{
'name': 'RemoteAccess',
'type': 'group',
......
......@@ -106,6 +106,9 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
{ key::kSavingBrowserHistoryDisabled,
prefs::kSavingBrowserHistoryDisabled,
Value::TYPE_BOOLEAN },
{ key::kAllowDeletingBrowserHistory,
prefs::kAllowDeletingBrowserHistory,
Value::TYPE_BOOLEAN },
{ key::kDeveloperToolsDisabled,
prefs::kDevToolsDisabled,
Value::TYPE_BOOLEAN },
......
......@@ -276,6 +276,9 @@ void ProfileImpl::RegisterUserPrefs(PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled,
false,
PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory,
true,
PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kForceSafeSearch,
false,
PrefRegistrySyncable::UNSYNCABLE_PREF);
......
......@@ -921,6 +921,10 @@ const char kSpeechRecognitionTrayNotificationShownContexts[] =
// Boolean controlling whether history saving is disabled.
const char kSavingBrowserHistoryDisabled[] = "history.saving_disabled";
// Boolean controlling whether deleting browsing and download history is
// permitted.
const char kAllowDeletingBrowserHistory[] = "history.deleting_enabled";
// Boolean controlling whether SafeSearch is mandatory for Google Web Searches.
const char kForceSafeSearch[] = "settings.force_safesearch";
......
......@@ -326,6 +326,7 @@ extern const char kSpeechRecognitionTrayNotificationShownContexts[];
extern const char kEnabledLabsExperiments[];
extern const char kEnableAutoSpellCorrect[];
extern const char kSavingBrowserHistoryDisabled[];
extern const char kAllowDeletingBrowserHistory[];
extern const char kForceSafeSearch[];
extern const char kDeleteTimePeriod[];
extern const char kLastClearBrowsingDataTime[];
......
......@@ -172,6 +172,14 @@
]
},
"AllowDeletingBrowserHistory": {
"os": [],
"test_policy": { "AllowDeletingBrowserHistory": false },
"pref_mappings": [
{ "pref": "history.deleting_enabled" }
]
},
"RemoteAccessClientFirewallTraversal": {
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment