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

Issue 2546433004: [OfflinePages] Restarts immediate processing if stopped due to no net (Closed)

Created:
4 years ago by dougarnett
Modified:
4 years ago
Reviewers:
Pete Williamson
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

[OfflinePages] Restarts immediate processing if stopped due to no net Adds a ConnectionNotifier helper class to be able to learn when we get connected and uses it in the Coordinator to try immediate start when we get connected after stopping because we had no connection. This is a memory-only network observer so only in effect if chrome stays resident in memory. Otherwise, we still have the GcmNetworkManager scheduler as a fallback. BUG=670119 Committed: https://crrev.com/7103c6cef4c8ed86a090e605e9817d1852452dc2 Cr-Commit-Position: refs/heads/master@{#436040}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Adds clearing of net observer if trying immediate and do have connection #

Patch Set 3 : Added some unittests #

Total comments: 3

Patch Set 4 : New test method: CallConnectionTypeObserver() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -1 line) Patch
M components/offline_pages/background/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A components/offline_pages/background/connection_notifier.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A components/offline_pages/background/connection_notifier.cc View 1 chunk +25 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_coordinator.h View 1 3 3 chunks +12 lines, -0 lines 0 comments Download
M components/offline_pages/background/request_coordinator.cc View 1 3 chunks +27 lines, -1 line 0 comments Download
M components/offline_pages/background/request_coordinator_unittest.cc View 1 2 3 3 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (17 generated)
dougarnett
Here's the one-shot network observer approach I'm looking at. Limited to immediate processing for now. ...
4 years ago (2016-12-01 00:32:33 UTC) #4
Pete Williamson
https://codereview.chromium.org/2546433004/diff/1/components/offline_pages/background/connection_notifier.cc File components/offline_pages/background/connection_notifier.cc (right): https://codereview.chromium.org/2546433004/diff/1/components/offline_pages/background/connection_notifier.cc#newcode21 components/offline_pages/background/connection_notifier.cc:21: if (type != net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE) Might the RC also want ...
4 years ago (2016-12-01 01:34:08 UTC) #5
dougarnett
https://codereview.chromium.org/2546433004/diff/1/components/offline_pages/background/connection_notifier.cc File components/offline_pages/background/connection_notifier.cc (right): https://codereview.chromium.org/2546433004/diff/1/components/offline_pages/background/connection_notifier.cc#newcode21 components/offline_pages/background/connection_notifier.cc:21: if (type != net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE) On 2016/12/01 01:34:08, Pete Williamson ...
4 years ago (2016-12-01 19:25:22 UTC) #8
Pete Williamson
lgtm
4 years ago (2016-12-01 23:25:05 UTC) #9
dougarnett
Added unit test coverage for both paths of starting a ConnectionNotifier
4 years ago (2016-12-01 23:41:48 UTC) #10
Pete Williamson
https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h#newcode355 components/offline_pages/background/request_coordinator.h:355: if (connection_notifier_) Why add this? It will fire an ...
4 years ago (2016-12-02 01:42:57 UTC) #13
dougarnett
https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h#newcode355 components/offline_pages/background/request_coordinator.h:355: if (connection_notifier_) On 2016/12/02 01:42:57, Pete Williamson wrote: > ...
4 years ago (2016-12-02 02:24:54 UTC) #16
Pete Williamson
On 2016/12/02 02:24:54, dougarnett wrote: > https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h > File components/offline_pages/background/request_coordinator.h (right): > > https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h#newcode355 > ...
4 years ago (2016-12-02 17:50:14 UTC) #17
dougarnett
https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h File components/offline_pages/background/request_coordinator.h (right): https://codereview.chromium.org/2546433004/diff/40001/components/offline_pages/background/request_coordinator.h#newcode355 components/offline_pages/background/request_coordinator.h:355: if (connection_notifier_) On 2016/12/02 02:24:54, dougarnett wrote: > On ...
4 years ago (2016-12-02 19:08:46 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/2546433004/60001
4 years ago (2016-12-02 21:43:38 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-02 21:52:18 UTC) #27
commit-bot: I haz the power
4 years ago (2016-12-02 21:53:58 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7103c6cef4c8ed86a090e605e9817d1852452dc2
Cr-Commit-Position: refs/heads/master@{#436040}

Powered by Google App Engine
This is Rietveld 408576698