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

Issue 2715433006: [Offline Pages] Turn Offliner::Cancel into an async operation to resolve conflicting assumptions (Closed)

Created:
3 years, 10 months ago by chili
Modified:
3 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, romax+watch_chromium.org, tburkard+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, gavinp+prer_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Turn Offliner::Cancel into an async operation to resolve conflicting assumptions between the Offliner and RequestCoordinator. Upon Offliner::Cancel, RequestCoordinator assumes that the offliner is free, but offliner may be waiting until save operation to complete. This discrepancy causes RequestCoordinator to bombard the offliner with all the pending requests, potentially blocking the main thread for the save operation callback to be called and causing all pending requests to be labeled as EXPIRED BUG=694864 Review-Url: https://codereview.chromium.org/2715433006 Cr-Commit-Position: refs/heads/master@{#454740} Committed: https://chromium.googlesource.com/chromium/src/+/9f04f39d54f599a346c59670f91923f4af05e416

Patch Set 1 #

Total comments: 22

Patch Set 2 : initial code review responses #

Patch Set 3 : update signatures for code review #

Total comments: 4

Patch Set 4 : more renaming #

Patch Set 5 : more renaming #

Patch Set 6 : rebase #

Patch Set 7 : forgot to init #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -52 lines) Patch
M chrome/browser/android/offline_pages/background_loader_offliner.h View 1 2 4 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/android/offline_pages/background_loader_offliner.cc View 1 2 3 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/android/offline_pages/background_loader_offliner_unittest.cc View 1 2 6 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/android/offline_pages/prerendering_offliner.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/android/offline_pages/prerendering_offliner.cc View 1 2 2 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc View 1 2 3 4 5 6 7 chunks +18 lines, -2 lines 0 comments Download
M components/offline_pages/core/background/offliner.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M components/offline_pages/core/background/offliner_stub.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/offline_pages/core/background/offliner_stub.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/offline_pages/core/background/request_coordinator.h View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M components/offline_pages/core/background/request_coordinator.cc View 1 2 3 4 5 5 chunks +68 lines, -33 lines 0 comments Download

Messages

Total messages: 34 (21 generated)
chili
Pete and I discussed 2 possible quickfixes: 1. Turn cancel into async, and request coordinator ...
3 years, 10 months ago (2017-02-23 21:49:55 UTC) #4
Pete Williamson
https://codereview.chromium.org/2715433006/diff/1/components/offline_pages/core/background/request_coordinator.cc File components/offline_pages/core/background/request_coordinator.cc (right): https://codereview.chromium.org/2715433006/diff/1/components/offline_pages/core/background/request_coordinator.cc#newcode259 components/offline_pages/core/background/request_coordinator.cc:259: active_request_->request_id()); Does HandleCancelRecordResultCallback() get called twice? Once here, and ...
3 years, 10 months ago (2017-02-24 00:35:46 UTC) #7
fgorski
https://codereview.chromium.org/2715433006/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc File chrome/browser/android/offline_pages/background_loader_offliner.cc (right): https://codereview.chromium.org/2715433006/diff/1/chrome/browser/android/offline_pages/background_loader_offliner.cc#newcode114 chrome/browser/android/offline_pages/background_loader_offliner.cc:114: // OfflinePageModel::SavePage() operation. We just ignore the callback. Is ...
3 years, 9 months ago (2017-02-27 18:07:26 UTC) #8
chili
Need to think about callback chaining and organization a little bit more... Will follow-up with ...
3 years, 9 months ago (2017-02-28 00:44:14 UTC) #9
Pete Williamson
Changes look good, one of my comments is still waiting for a reply.
3 years, 9 months ago (2017-02-28 22:50:15 UTC) #10
chili
https://codereview.chromium.org/2715433006/diff/1/components/offline_pages/core/background/request_coordinator.cc File components/offline_pages/core/background/request_coordinator.cc (right): https://codereview.chromium.org/2715433006/diff/1/components/offline_pages/core/background/request_coordinator.cc#newcode510 components/offline_pages/core/background/request_coordinator.cc:510: nextCallback.Run(offline_id); On 2017/02/24 00:35:46, Pete Williamson wrote: > This ...
3 years, 9 months ago (2017-03-01 02:37:33 UTC) #11
fgorski
Almost there. https://codereview.chromium.org/2715433006/diff/40001/components/offline_pages/core/background/request_coordinator.cc File components/offline_pages/core/background/request_coordinator.cc (right): https://codereview.chromium.org/2715433006/diff/40001/components/offline_pages/core/background/request_coordinator.cc#newcode514 components/offline_pages/core/background/request_coordinator.cc:514: void RequestCoordinator::RecordUMAForCancel( This method name and state ...
3 years, 9 months ago (2017-03-01 17:47:43 UTC) #16
chili
https://codereview.chromium.org/2715433006/diff/40001/components/offline_pages/core/background/request_coordinator.cc File components/offline_pages/core/background/request_coordinator.cc (right): https://codereview.chromium.org/2715433006/diff/40001/components/offline_pages/core/background/request_coordinator.cc#newcode514 components/offline_pages/core/background/request_coordinator.cc:514: void RequestCoordinator::RecordUMAForCancel( On 2017/03/01 17:47:43, fgorski wrote: > This ...
3 years, 9 months ago (2017-03-01 19:00:20 UTC) #17
chili
Updated the RecordUMA method name to simply UpdateStatusForCancel, per offline discussion with Filip. PTAL
3 years, 9 months ago (2017-03-01 21:56:02 UTC) #18
fgorski
lgtm
3 years, 9 months ago (2017-03-01 22:03:58 UTC) #19
Pete Williamson
lgtm
3 years, 9 months ago (2017-03-01 22:17:09 UTC) #20
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/2715433006/120001
3 years, 9 months ago (2017-03-04 01:17:14 UTC) #31
commit-bot: I haz the power
3 years, 9 months ago (2017-03-04 01:25:01 UTC) #34
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/9f04f39d54f599a346c59670f919...

Powered by Google App Engine
This is Rietveld 408576698