Bug 1883278 - Remove browser.sessionstore.collect_session_storage and browser.sessionstore.collect_zoom. r=farre,sessionstore-reviewers

These prefs don't do anything unless browser.sessionstore.platform_collection is
enabled, but we don't need the granularity that they provide. Let's just use
have the one  browser.sessionstore.platform_collection pref control everything.

Differential Revision: https://phabricator.services.mozilla.com/D203374
This commit is contained in:
Peter Van der Beken 2024-03-13 10:56:32 +00:00
Родитель 8226bad6a1
Коммит 30b363a85d
4 изменённых файлов: 2 добавлений и 25 удалений

Просмотреть файл

@ -1300,8 +1300,6 @@ pref("browser.sessionstore.upgradeBackup.maxUpgradeBackups", 3);
pref("browser.sessionstore.debug", false);
// Forget closed windows/tabs after two weeks
pref("browser.sessionstore.cleanup.forget_closed_after", 1209600000);
// Platform collects session storage data for session store
pref("browser.sessionstore.collect_session_storage", true);
// temporary pref that will be removed in a future release, see bug 1836952
pref("browser.sessionstore.persist_closed_tabs_between_sessions", true);

Просмотреть файл

@ -2579,11 +2579,6 @@ nsresult CanonicalBrowsingContext::WriteSessionStorageToSessionStore(
void CanonicalBrowsingContext::UpdateSessionStoreSessionStorage(
const std::function<void()>& aDone) {
if (!StaticPrefs::browser_sessionstore_collect_session_storage_AtStartup()) {
aDone();
return;
}
using DataPromise = BackgroundSessionStorageManager::DataPromise;
BackgroundSessionStorageManager::GetData(
this, StaticPrefs::browser_sessionstore_dom_storage_limit(),

Просмотреть файл

@ -1665,18 +1665,6 @@
#endif
mirror: once
# Platform collection of session storage data for session store
- name: browser.sessionstore.collect_session_storage
type: bool
value: @IS_NOT_ANDROID@
mirror: once
# Platform collection of zoom data for session store
- name: browser.sessionstore.collect_zoom
type: bool
value: @IS_NOT_ANDROID@
mirror: once
# Causes SessionStore to ignore non-final update messages from
# browser tabs that were not caused by a flush from the parent.
# This is a testing flag and should not be used by end-users.

Просмотреть файл

@ -356,9 +356,7 @@ void SessionStoreChangeListener::AddEventListeners() {
if (EventTarget* target = GetEventTarget()) {
target->AddSystemEventListener(kInput, this, false);
target->AddSystemEventListener(kScroll, this, false);
if (StaticPrefs::browser_sessionstore_collect_zoom_AtStartup()) {
target->AddSystemEventListener(kResize, this, false);
}
target->AddSystemEventListener(kResize, this, false);
mCurrentEventTarget = target;
}
}
@ -367,9 +365,7 @@ void SessionStoreChangeListener::RemoveEventListeners() {
if (mCurrentEventTarget) {
mCurrentEventTarget->RemoveSystemEventListener(kInput, this, false);
mCurrentEventTarget->RemoveSystemEventListener(kScroll, this, false);
if (StaticPrefs::browser_sessionstore_collect_zoom_AtStartup()) {
mCurrentEventTarget->RemoveSystemEventListener(kResize, this, false);
}
mCurrentEventTarget->RemoveSystemEventListener(kResize, this, false);
}
mCurrentEventTarget = nullptr;