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

Issue 2705323006: Last_n: Do not save a snapshot of a closing tab. (Closed)

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

Description

Last_n: Do not save a snapshot of a closing tab. Listening to the tab being hidden as a signal to save last_n offline snapshots of pages also caused them to be saved for Android tabs that are being closed. For this platform, when a tab is closed it is initially hidden for a few seconds as a grace period for the user to undo the closure. This change monitors tab-will-close signals in Java and dispatches them to the last_n native code so that we can register what's going on and properly ignore the tab hidden event. A test was also added to test this functionality. BUG=685791 Review-Url: https://codereview.chromium.org/2705323006 Cr-Commit-Position: refs/heads/master@{#453712} Committed: https://chromium.googlesource.com/chromium/src/+/f1d756b8310d09fcd4a3e7ab751c4e184c84d5b5

Patch Set 1 #

Patch Set 2 : Minor comment changes. #

Total comments: 2

Patch Set 3 : Adjusted variable name to coding style. #

Patch Set 4 : Rebase. #

Patch Set 5 : Rebase after base change landed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -2 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_bridge.cc View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 2 3 4 2 chunks +16 lines, -2 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (11 generated)
carlosk
dimich@: PTAL. Note that this one depends on https://crrev.com/2706343007.
3 years, 10 months ago (2017-02-24 00:36:44 UTC) #4
Dmitry Titov
lgtm with a nit: https://codereview.chromium.org/2705323006/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.h File chrome/browser/android/offline_pages/recent_tab_helper.h (right): https://codereview.chromium.org/2705323006/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.h#newcode154 chrome/browser/android/offline_pages/recent_tab_helper.h:154: bool tab_is_closing = false; Nit: ...
3 years, 10 months ago (2017-02-24 01:49:38 UTC) #5
carlosk
Thanks. https://codereview.chromium.org/2705323006/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.h File chrome/browser/android/offline_pages/recent_tab_helper.h (right): https://codereview.chromium.org/2705323006/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.h#newcode154 chrome/browser/android/offline_pages/recent_tab_helper.h:154: bool tab_is_closing = false; On 2017/02/24 01:49:38, Dmitry ...
3 years, 10 months ago (2017-02-24 02:06:35 UTC) #6
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/2705323006/80001
3 years, 9 months ago (2017-02-28 21:13:04 UTC) #13
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 21:54:12 UTC) #16
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/f1d756b8310d09fcd4a3e7ab751c...

Powered by Google App Engine
This is Rietveld 408576698