[SHv2] Add a control for unused site permissions auto-revocation [1/2]
Safety Hub automatically revokes permissions for sites that are not
visited for longer than N days (currently 60). Add an option for users
to opt out from this automatic behavior by switching off a toggle.
This CL adds a toggle element and a pref that saves the user's choice.
The logic that stops the automatic revocation when toggle is switched
off will be added in the next CL.
Screenshots: https://crbug.com/1345920#c178
Bug: 1345920, 1443466
Change-Id: Icdcbc6911b838e006fe6aefc46b8c80386371c30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4604064
Reviewed-by: Side YILMAZ <[email protected]>
Reviewed-by: Elias Klim <[email protected]>
Commit-Queue: Aisulu Rakhmetullina <[email protected]>
Reviewed-by: Rainhard Findling <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1166033}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 201574c..f50c664a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -129,7 +129,7 @@
#include "components/password_manager/core/browser/password_manager.h"
#include "components/payments/core/payment_prefs.h"
#include "components/performance_manager/public/user_tuning/prefs.h"
-#include "components/permissions/permission_actions_history.h"
+#include "components/permissions/pref_names.h"
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/browser/url_blocklist_manager.h"
#include "components/policy/core/common/management/management_service.h"
@@ -1606,7 +1606,7 @@
password_manager::PasswordManager::RegisterProfilePrefs(registry);
payments::RegisterProfilePrefs(registry);
performance_manager::user_tuning::prefs::RegisterProfilePrefs(registry);
- permissions::PermissionActionsHistory::RegisterProfilePrefs(registry);
+ permissions::RegisterProfilePrefs(registry);
PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry);
PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
policy::URLBlocklistManager::RegisterProfilePrefs(registry);