New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716141 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 740706



Sign in to add a comment

Delete offline page cache in system setting

Project Member Reported by romax@chromium.org, Apr 27 2017

Issue description

Hook up the 'Free up space' of unimportant data in Android Settings->Apps->Chrome->Manage Space with deleting all temporary offline pages.
 

Comment 1 by romax@chromium.org, May 2 2017

Seems like we're not going to hook with importance, instead we're targeting to move the cache pages to cache directory, which will be deleted in Android Settings->Apps->Chrome->Clear Cache.
Is there a design doc or other place I can read about the plan?
Answered my own question. go/separating-storage-for-offline-pages

Comment 4 by romax@chromium.org, May 9 2017

There are still many issues to be considered after we move the OPC into cache directory, for example the consistency check since the 'clear cache' in system setting is not going through OfflinePageModel.
The known issues should be listed either in this issue or in the doc. If they don't refer to restricted information then they should preferably be listed here as the doc has restricted access.

Comment 6 by romax@chromium.org, May 11 2017

Another issue might be after system clearing cache, since the folder is gone, we may get errors when trying to save the pages.
So consistency check and ensure the archive folder has created should be bundled somehow.
The reported problem from issue 725122 made me remember that one big requirement for this change is that it cannot have unexpected consequences over existing downloads. Just noting it here to make sure we keep this in mind.

Comment 8 by romax@chromium.org, Jul 10 2017

Blocking: 740706
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/429de7772b63be050a48c7ba77b6a484c8e6f20e

commit 429de7772b63be050a48c7ba77b6a484c8e6f20e
Author: Yafei Duan <romax@chromium.org>
Date: Tue Oct 03 23:23:15 2017

[Offline Pages] Use cache directory for temporary pages.

For temporary offline pages, there is a new archive directory in app's
cache directory, which makes it possible to delete all temporary pages
when the user clicks 'Clear Cache' in Android settings.
The patch added a new file path, changed related behaviors in archive
manager when getting storage stats or all archive directories.
If during the creation of OfflinePageModel, the PathService::Get() fails
to get the temporary archive directory, there will be no temporary pages
saved for the Chrome Lifecycle, since the service couldn't get such a
path. So all attempts to save temporary pages will return failure.

Bug:  716141 
Change-Id: I4f7fc5cdd4907e2b1e90b5e40ad2358753c53efb
Reviewed-on: https://chromium-review.googlesource.com/667750
Commit-Queue: Yafei Duan <romax@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506227}
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/chrome/browser/offline_pages/android/offline_page_model_factory.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/chrome/browser/offline_pages/test_offline_page_model_builder.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/archive_manager.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/archive_manager.h
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/archive_manager_unittest.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/model/clear_storage_task.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/offline_page_model_impl.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/offline_page_model_impl.h
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/offline_page_model_impl_unittest.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/offline_page_storage_manager.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/components/offline_pages/core/offline_page_storage_manager_unittest.cc
[modify] https://crrev.com/429de7772b63be050a48c7ba77b6a484c8e6f20e/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Started)

Sign in to add a comment