-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Include origin directory in backup if it is visited after certa…
…in period of time https://bugs.webkit.org/show_bug.cgi?id=242605 rdar://94855540 Reviewed by Geoffrey Garen. In iOS 16, we introduced origin directory and origin file in new website data layout. This leads to more directories and files are backed up for WebKit apps, increasing backup size and putting pressure on backup server. To solve the issue, we now only back up origin directories if user visits the origin multiple times. Specifically, what this patch does are: 1. mark origin directory excluded from backup at its creation 2. mark origin directory included in backup when origin directory is visited after backup exclusion period (currently the period is 24 hours) * Source/WTF/wtf/FileSystem.cpp: (WTF::FileSystemImpl::setExcludedFromBackup): (WTF::FileSystemImpl::excludeFromBackup): Deleted. * Source/WTF/wtf/FileSystem.h: * Source/WTF/wtf/cocoa/FileSystemCocoa.mm: (WTF::FileSystemImpl::setExcludedFromBackup): (WTF::FileSystemImpl::excludeFromBackup): Deleted. * Source/WebKit/NetworkProcess/NetworkProcess.h: * Source/WebKit/NetworkProcess/NetworkProcess.messages.in: * Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::setBackupExclusionPeriodForTesting): * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::writeOriginToFile): (WebKit::NetworkStorageManager::NetworkStorageManager): (WebKit::NetworkStorageManager::includeOriginInBackupIfNecessary): (WebKit::NetworkStorageManager::writeOriginToFileIfNecessary): (WebKit::NetworkStorageManager::setBackupExclusionPeriodForTesting): * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h: * Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath): * Source/WebKit/NetworkProcess/storage/OriginStorageManager.h: (WebKit::OriginStorageManager::originFileCreationTimestamp const): (WebKit::OriginStorageManager::setOriginFileCreationTimestamp): (WebKit::OriginStorageManager::includedInBackup const): (WebKit::OriginStorageManager::markIncludedInBackup): (WebKit::OriginStorageManager::didWriteOriginToFile const): Deleted. (WebKit::OriginStorageManager::markDidWriteOriginToFile): Deleted. * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _setBackupExclusionPeriodForTesting:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * Source/WebKit/UIProcess/Network/NetworkProcessProxy.h: * Source/WebKit/UIProcess/Network/NetworkProcessProxyCocoa.mm: (WebKit::NetworkProcessProxy::setBackupExclusionPeriodForTesting): * Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::setBackupExclusionPeriodForTesting): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: * Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): Canonical link: https://commits.webkit.org/252472@main
- Loading branch information
Showing
18 changed files
with
218 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.