Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 1307753002: [Offline pages] Adding capability to free up space used by Offline pages (Closed)

Created:
5 years, 4 months ago by fgorski
Modified:
5 years, 3 months ago
CC:
chromium-reviews, ianwen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline pages] Adding capability to free up space used by Offline pages In this patch: * Offline Page Bridge is extended to delete multiple pages as well as pull out a list of candidate pages for clean up. * Offline Page Model is extended to offer a list of pages to clean up * A dialog to free up space is added * A header is added in a Saved offline section of bookmarks UI to offer cleaning up space (through the dialog above). (Header is shown, when number of pages to delete reaches a certain threshold). In order to test the functionality (which triggers with a month delay): * bring thresholds to 0 * update code offering pages for clean up (e.g. half of the existing set). TEST=tested manually after modifications applied. BUG=491352 R=jianli@chromium.org,kkimlabs@chromium.org Committed: https://crrev.com/683028f51e4aaae0782d1583f33c401436f9cd37 Cr-Commit-Position: refs/heads/master@{#345804}

Patch Set 1 #

Patch Set 2 : Fixing a crash from a second round of manual pass #

Total comments: 41

Patch Set 3 : Addressing code review feedback from Kibeom and Jian #

Total comments: 10

Patch Set 4 : Trying to address arm64 build issue #

Patch Set 5 : Addressing feedback from Jian Li #

Patch Set 6 : Attempt 2 at the arm64 build issue #

Total comments: 20

Patch Set 7 : Attempt 3 at the arm64 build issue #

Patch Set 8 : Addressing code review comments from newt@ #

Total comments: 2

Patch Set 9 : Fixing documentation for one of the strings #

Patch Set 10 : Converting jlongarray to std::vector<int64> #

Unified diffs Side-by-side diffs Delta from patch set Stats (+475 lines, -55 lines) Patch
A + chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml View 1 2 3 chunks +5 lines, -16 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java View 1 2 3 4 5 6 7 11 chunks +65 lines, -8 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageBridge.java View 1 2 3 4 2 chunks +31 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceCallback.java View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageStorageSpaceHeader.java View 1 2 3 4 5 6 7 1 chunk +94 lines, -0 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.h View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.cc View 1 2 3 4 5 6 7 8 9 6 chunks +53 lines, -24 lines 0 comments Download
M components/offline_pages/offline_page_model.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_model.cc View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_model_unittest.cc View 1 2 3 4 9 chunks +76 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (3 generated)
fgorski
Please take a look. kkimlabs@: enhanced bookmark code newt@: layout, strings and android side of ...
5 years, 4 months ago (2015-08-21 01:53:58 UTC) #2
Kibeom Kim (inactive)
https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml File chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml (right): https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml#newcode8 chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml:8: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" eb_promo_header and this is quite similar so ...
5 years, 4 months ago (2015-08-21 20:19:39 UTC) #3
jianli
https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java (right): https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java#newcode271 chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java:271: mDelegate.getModel().getOfflinePageBridge(), new StorageSpaceHeaderCallback() { I believe you will hit ...
5 years, 4 months ago (2015-08-21 21:06:27 UTC) #4
Kibeom Kim (inactive)
https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java File chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java (right): https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java#newcode40 chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java:40: * is finished, it should be taken care of ...
5 years, 4 months ago (2015-08-21 21:15:08 UTC) #5
fgorski
Addressed. PTAL https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml File chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml (right): https://codereview.chromium.org/1307753002/diff/20001/chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml#newcode8 chrome/android/java/res/layout/eb_offline_pages_storage_space_header.xml:8: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" On 2015/08/21 20:19:39, Kibeom Kim ...
5 years, 4 months ago (2015-08-21 22:09:39 UTC) #6
jianli
lgtm https://codereview.chromium.org/1307753002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java (right): https://codereview.chromium.org/1307753002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java#newcode271 chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java:271: if (mDelegate.getModel().getOfflinePageBridge() != null) { nit: cache mDelegate.getModel().getOfflinePageBridge() ...
5 years, 4 months ago (2015-08-21 23:39:22 UTC) #7
Kibeom Kim (inactive)
lgtm
5 years, 3 months ago (2015-08-24 18:30:38 UTC) #8
fgorski
Addressed feedback from Jian Li. Still working on bitness problems in compilation on arm64 https://codereview.chromium.org/1307753002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkItemsAdapter.java ...
5 years, 3 months ago (2015-08-24 18:47:14 UTC) #9
newt (away)
Note on naming: Java package names should not contain underscores. It should be "org.chromium.chrome.browser.offlinepages." https://codereview.chromium.org/1307753002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java ...
5 years, 3 months ago (2015-08-24 22:37:09 UTC) #10
fgorski
As for package naming. ianwen@ pointed me to that issue in our code few weeks ...
5 years, 3 months ago (2015-08-25 18:25:25 UTC) #11
fgorski
self review, noticed omission. Waiting for the tests to finish to fix the string documentation ...
5 years, 3 months ago (2015-08-25 18:28:27 UTC) #12
fgorski
newt@, friendly ping ;)
5 years, 3 months ago (2015-08-27 00:26:15 UTC) #13
newt (away)
lgtm https://codereview.chromium.org/1307753002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java File chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java (right): https://codereview.chromium.org/1307753002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java#newcode38 chrome/android/java/src/org/chromium/chrome/browser/offline_pages/OfflinePageFreeUpSpaceDialog.java:38: public static OfflinePageFreeUpSpaceDialog newInstance( On 2015/08/25 18:25:25, fgorski ...
5 years, 3 months ago (2015-08-27 03:13:27 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1307753002/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1307753002/170001
5 years, 3 months ago (2015-08-27 05:34:39 UTC) #17
commit-bot: I haz the power
Committed patchset #10 (id:170001)
5 years, 3 months ago (2015-08-27 05:39:26 UTC) #18
commit-bot: I haz the power
5 years, 3 months ago (2015-08-27 05:40:05 UTC) #19
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/683028f51e4aaae0782d1583f33c401436f9cd37
Cr-Commit-Position: refs/heads/master@{#345804}

Powered by Google App Engine
This is Rietveld 408576698