[FspCache] Uninitialize provider upon user unmount
CL:5409956 introduced CacheManager::UninitializeForProvider(). Let Service::UnmountFileSystem() be the caller of that. When the UnmountReason reason is UNMOUNT_REASON_USER, the file system (with the same mount path) will never be used again and thus, the content cache will never be used again. Thus, when the reason is UNMOUNT_REASON_USER, uninitialize the provider from the CacheManager if it was initialized. Introduce CacheManager::IsProviderInitialized() to do the pre-condition check. Do not uninitialize if the reason is UNMOUNT_REASON_SHUTDOWN because the provider will be restored upon start up. Test: browser_tests --gtest_filter=CloudFileSystemBrowserTestWithContentCache* Bug: b/330812469 Change-Id: I474f2fa5a988e7b7d930d9f634f6fefc99a85477 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5417754 Reviewed-by:Ben Reich <benreich@chromium.org> Commit-Queue: Cassy Chun-Crogan <cassycc@google.com> Cr-Commit-Position: refs/heads/main@{#1282324}
Loading
Please register or sign in to comment