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

Issue 2635023005: Minor improvements to RecentTabHelper. (Closed)

Created:
3 years, 11 months ago by carlosk
Modified:
3 years, 11 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

Minor improvements to RecentTabHelper. Adds minor improvements to RecentTabHelper: - Better organize the state kept during the async call chain of a snapshot save: always invalidate pointers when needed and convert if-checks of |download_info| to DCHECKs. - Add more verifications the the navigation type before accepting to save a snapshot for it. - Removed the unneeded IsSamePage method. - Added isSnapshottingForLastN to make it clearer what the request_id checks exist for. - Move member initializers to the header file. - Some minor code simplifications. This is a preparation step to change the snapshot mechanism to use user interaction triggers instead of navigation events. BUG=678367 Review-Url: https://codereview.chromium.org/2635023005 Cr-Commit-Position: refs/heads/master@{#444262} Committed: https://chromium.googlesource.com/chromium/src/+/fd10fe94ba828949dcddd148fb73c3797ab83ef3

Patch Set 1 #

Patch Set 2 : A couple more things I had forgotten. #

Total comments: 17

Patch Set 3 : Address reviewer's comments; Removed IsExternalProtocol check due to test crash. #

Patch Set 4 : Removed unneeded DCHECK_CURRENTLY_ON. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -61 lines) Patch
M chrome/browser/android/offline_pages/recent_tab_helper.h View 1 2 3 chunks +21 lines, -14 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 2 3 10 chunks +34 lines, -45 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
carlosk
dimich@: PTAL. dewittj@: FYI. https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (left): https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc#oldcode150 chrome/browser/android/offline_pages/recent_tab_helper.cc:150: if (download_info_ && !navigation_handle->IsSamePage()) { ...
3 years, 11 months ago (2017-01-17 23:09:57 UTC) #4
dewittj
lgtm with some nits. https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (left): https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc#oldcode150 chrome/browser/android/offline_pages/recent_tab_helper.cc:150: if (download_info_ && !navigation_handle->IsSamePage()) { ...
3 years, 11 months ago (2017-01-17 23:21:53 UTC) #5
Dmitry Titov
lgtm, agreed with notes from Justin
3 years, 11 months ago (2017-01-18 00:43:35 UTC) #6
carlosk
Thanks. https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (left): https://codereview.chromium.org/2635023005/diff/20001/chrome/browser/android/offline_pages/recent_tab_helper.cc#oldcode150 chrome/browser/android/offline_pages/recent_tab_helper.cc:150: if (download_info_ && !navigation_handle->IsSamePage()) { On 2017/01/17 23:21:52, ...
3 years, 11 months ago (2017-01-18 03:06:10 UTC) #11
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/2635023005/20002
3 years, 11 months ago (2017-01-18 03:07:01 UTC) #14
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 03:42:22 UTC) #17
Message was sent while issue was closed.
Committed patchset #4 (id:20002) as
https://chromium.googlesource.com/chromium/src/+/fd10fe94ba828949dcddd148fb73...

Powered by Google App Engine
This is Rietveld 408576698