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

Issue 2655673005: RecentTabHelper won't accept overlapping requests from Downloads anymore. (Closed)

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

Description

RecentTabHelper won't accept overlapping requests from Downloads anymore. This change fixes a free-after-use bug by changing the way RecentTabHelper handles page snapshot requests from Downloads. The main change is that it now will ignore overlapping requests from Downloads but a few other changes were made, many of them required to get this properly fixed: - Moved SnapshotProgressInfo definition into the CC file. - Fixed issues with overlapping snapshot requests from Downloads and page quality status events. - Fixed potential issue where last_n and Downloads requests would be mixed up in case Background Downloader was disabled. - Added enforcement of acceptable Offline namespaces for requests. - Changed the logic for automatically replacing Downloads snapshots once the page attains high quality ("fully" loaded). - Other minor code and comments improvements. Note: snapshot overlap between last_n and Downloads requests are still accepted. BUG=678367, 683580 Review-Url: https://codereview.chromium.org/2655673005 Cr-Commit-Position: refs/heads/master@{#446882} Committed: https://chromium.googlesource.com/chromium/src/+/01fea95b3e06b6b270b816e798e03a7995589d1a

Patch Set 1 #

Total comments: 12

Patch Set 2 : Added test to check download requests don't overlap. #

Patch Set 3 : Minor changes from addressing dewittj@ comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -109 lines) Patch
M chrome/browser/android/offline_pages/recent_tab_helper.h View 1 2 3 chunks +40 lines, -46 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 2 11 chunks +129 lines, -51 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc View 1 13 chunks +60 lines, -12 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
carlosk
dimich@: PTAL.
3 years, 11 months ago (2017-01-25 01:17:33 UTC) #4
carlosk
dimich@: PTAL. dewittj@: FYI.
3 years, 11 months ago (2017-01-25 01:19:47 UTC) #6
Dmitry Titov
Looks awesome, nice comments and structure of code is improved. Is it possible to add ...
3 years, 10 months ago (2017-01-27 04:18:22 UTC) #9
carlosk
Thanks! Indeed a new test was in order and it is now there. https://codereview.chromium.org/2655673005/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc File ...
3 years, 10 months ago (2017-01-27 18:47:14 UTC) #10
dewittj
Publishing drafts from yesterday, will update more based on new patch. https://codereview.chromium.org/2655673005/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (right): ...
3 years, 10 months ago (2017-01-27 18:48:57 UTC) #11
carlosk
Thanks. https://codereview.chromium.org/2655673005/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (right): https://codereview.chromium.org/2655673005/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc#newcode106 chrome/browser/android/offline_pages/recent_tab_helper.cc:106: // that the call is from Downloads. On ...
3 years, 10 months ago (2017-01-27 23:13:30 UTC) #12
Dmitry Titov
lgtm
3 years, 10 months ago (2017-01-27 23:36:38 UTC) #13
dewittj
lgtm, thanks! Is there any way to rerun the fuzzer on the try bots?
3 years, 10 months ago (2017-01-27 23:52:08 UTC) #14
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/2655673005/40001
3 years, 10 months ago (2017-01-28 00:55:40 UTC) #16
carlosk
On 2017/01/27 23:52:08, dewittj wrote: > lgtm, thanks! > > Is there any way to ...
3 years, 10 months ago (2017-01-28 00:57:36 UTC) #17
commit-bot: I haz the power
3 years, 10 months ago (2017-01-28 02:08:24 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/01fea95b3e06b6b270b816e798e0...

Powered by Google App Engine
This is Rietveld 408576698