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

Issue 2706343007: Only show Last N Pages in the UI when the corresponding tab is visible. (cont'd) (Closed)

Created:
3 years, 9 months ago by carlosk
Modified:
3 years, 9 months ago
CC:
chromium-reviews, ntp-dev+reviews_chromium.org, dewittj+watch_chromium.org, fgorski+watch_chromium.org, romax+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, noyau+watch_chromium.org, agrieve+watch_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only show Last N Pages in the UI when the corresponding tab is visible. This patch takes two approaches: * NTP suggestions now use a DownloadUIAdapter to manage the set of items on the page. This adapter is notified about tab addition and removal, and only notifies about pages that correspond to a tab. * Deletes pages when a tab is closed. patch from issue 2684973014 at patchset 180001 (http://crrev.com/2684973014#ps180001) Note: dewittj@, who is currently OOO, is the original author of this patch at https://crrev.com/2684973014. I (carlosk@) am taking over it because it needed addressing of latest comments and I have another change that depends on this one. BUG= Review-Url: https://codereview.chromium.org/2706343007 Cr-Commit-Position: refs/heads/master@{#453685} Committed: https://chromium.googlesource.com/chromium/src/+/f9671b26418b5a1c11cd23f56e747a3941b78aaa

Patch Set 1 : Latest patch set by dewittj@ from https://crrev.com/2684973014 #

Patch Set 2 : Switch from a weak-refs-map approach to actively monitoring Activity state. #

Patch Set 3 : Rebase. #

Total comments: 2

Patch Set 4 : Move variable definition up to beginning of file. #

Patch Set 5 : Rebase. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+832 lines, -227 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java View 1 2 3 4 2 chunks +12 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java View 1 2 3 5 chunks +87 lines, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.cc View 1 2 3 4 5 2 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 4 chunks +14 lines, -2 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 2 chunks +5 lines, -0 lines 0 comments Download
M components/ntp_snippets/offline_pages/offline_pages_test_utils.h View 1 chunk +4 lines, -0 lines 0 comments Download
M components/ntp_snippets/offline_pages/offline_pages_test_utils.cc View 1 chunk +10 lines, -4 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h View 4 chunks +19 lines, -28 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc View 1 2 7 chunks +86 lines, -120 lines 0 comments Download
M components/ntp_snippets/offline_pages/recent_tab_suggestions_provider_unittest.cc View 20 chunks +151 lines, -46 lines 0 comments Download
M components/offline_pages/core/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages/core/downloads/download_ui_adapter.h View 1 2 3 4 5 5 chunks +14 lines, -3 lines 0 comments Download
M components/offline_pages/core/downloads/download_ui_adapter.cc View 1 2 3 4 5 10 chunks +45 lines, -23 lines 0 comments Download
M components/offline_pages/core/downloads/download_ui_adapter_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A components/offline_pages/core/recent_tabs/BUILD.gn View 1 chunk +39 lines, -0 lines 0 comments Download
A components/offline_pages/core/recent_tabs/recent_tabs_ui_adapter_delegate.h View 1 chunk +85 lines, -0 lines 0 comments Download
A components/offline_pages/core/recent_tabs/recent_tabs_ui_adapter_delegate.cc View 1 chunk +97 lines, -0 lines 0 comments Download
A components/offline_pages/core/recent_tabs/recent_tabs_ui_adapter_delegate_unittest.cc View 1 chunk +122 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (25 generated)
carlosk
tedchoc@, vitaliii@, dimich@: PTAL. This is the continuation of the change from dewittj@ you already ...
3 years, 9 months ago (2017-02-23 23:26:05 UTC) #7
Dmitry Titov
still lgtm from offline pages.
3 years, 9 months ago (2017-02-24 01:25:37 UTC) #9
vitaliii
still lgtm for components/ntp_snippets.
3 years, 9 months ago (2017-02-24 12:36:16 UTC) #12
Ted C
lgtm (just looked at the ChromeActivity and OfflinePageUtils) https://codereview.chromium.org/2706343007/diff/50001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java File chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java (right): https://codereview.chromium.org/2706343007/diff/50001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java#newcode765 chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java:765: private ...
3 years, 9 months ago (2017-02-27 21:33:54 UTC) #15
carlosk
Thanks. https://codereview.chromium.org/2706343007/diff/50001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java File chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java (right): https://codereview.chromium.org/2706343007/diff/50001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java#newcode765 chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java:765: private static Map<ChromeActivity, RecentTabTracker> sTabModelObservers = new HashMap<>(); ...
3 years, 9 months ago (2017-02-27 21:41:59 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2706343007/70001
3 years, 9 months ago (2017-02-27 21:42:40 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/396615)
3 years, 9 months ago (2017-02-27 22:47:57 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2706343007/70001
3 years, 9 months ago (2017-02-27 22:51:21 UTC) #23
commit-bot: I haz the power
Failed to apply patch for chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-02-27 23:30:45 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2706343007/70001
3 years, 9 months ago (2017-02-27 23:45:36 UTC) #27
commit-bot: I haz the power
Failed to apply patch for chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-02-27 23:51:19 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2706343007/90001
3 years, 9 months ago (2017-02-27 23:57:34 UTC) #32
commit-bot: I haz the power
Failed to apply patch for components/offline_pages/core/downloads/download_ui_adapter.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-02-28 01:19:43 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2706343007/110001
3 years, 9 months ago (2017-02-28 18:37:49 UTC) #37
dewittj
I think if this doesn't go through you should just git-cl land it.
3 years, 9 months ago (2017-02-28 18:38:22 UTC) #38
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 20:22:30 UTC) #41
Message was sent while issue was closed.
Committed patchset #6 (id:110001) as
https://chromium.googlesource.com/chromium/src/+/f9671b26418b5a1c11cd23f56e74...

Powered by Google App Engine
This is Rietveld 408576698