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

Issue 2830843002: [Offline pages] Updates to background scheduling to use BTS (Closed)

Created:
3 years, 8 months ago by fgorski
Modified:
3 years, 6 months ago
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/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline pages] Updates to background scheduling to use BTS This patch moves offline page scheduling for pre-M OSs to background_task_scheduler component and removes a lot of code in the process: * switches offline page handling in ChromeBackgroundService to reschedule * removes ChromeBackgroundserviceWaiter * removes subclasses of BackgroundScheduler (responsible for scheduling on different OS versions) * Moves useful code from BackgroundOfflinerTask to OfflineBackgroundTask * Simplifies BackgroundSchedulerProcessor (and removes namespace for interfaces) * Updates the tests for classes mentioned above. BUG=699261 Review-Url: https://codereview.chromium.org/2830843002 Cr-Commit-Position: refs/heads/master@{#476352} Committed: https://chromium.googlesource.com/chromium/src/+/c3cf4c7d10c4796ef841fc181d0207cfdc4ad252

Patch Set 1 #

Patch Set 2 : Updating ChromeBackgroundService/Waiter part of code #

Patch Set 3 : Rebasing #

Patch Set 4 : Gradually moving code out of BackgroundOfflinerTask #

Patch Set 5 : Removing BackgroundSchedulerProcessor interface and renaming implementation #

Patch Set 6 : Rebasing #

Patch Set 7 : Move code from BackgroundOfflinerTask to OfflineBackgroundTask #

Total comments: 24

Patch Set 8 : Adding tests to cover OfflineBackgroundTask #

Patch Set 9 : Addressing CR feedback from Pete #

Total comments: 6

Patch Set 10 : Addressing code review comments #

Total comments: 1

Patch Set 11 : Adding BackgroundScheduler.LazyHolder #

Patch Set 12 : Fixing the crash on NCN not being initialized #

Unified diffs Side-by-side diffs Delta from patch set Stats (+605 lines, -974 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java View 1 2 3 4 5 6 7 8 7 chunks +7 lines, -67 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundServiceWaiter.java View 1 1 chunk +0 lines, -50 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundGcmScheduler.java View 1 chunk +0 lines, -68 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundJobScheduler.java View 1 chunk +0 lines, -53 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundOfflinerTask.java View 1 2 3 4 5 6 1 chunk +0 lines, -98 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java View 1 2 3 4 5 6 7 8 9 10 2 chunks +53 lines, -52 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java View 2 chunks +6 lines, -5 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerProcessor.java View 1 2 3 4 5 6 7 1 chunk +46 lines, -0 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerProcessorImpl.java View 1 2 3 4 1 chunk +0 lines, -25 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/DeviceConditions.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflineBackgroundTask.java View 1 2 3 4 5 6 7 8 2 chunks +91 lines, -33 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java View 1 2 chunks +0 lines, -7 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/BackgroundSchedulerProcessor.java View 1 2 3 4 1 chunk +0 lines, -29 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 5 6 7 8 9 10 5 chunks +2 lines, -10 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ChromeBackgroundServiceTest.java View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
D chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackgroundServiceWaiterTest.java View 1 1 chunk +0 lines, -75 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundOfflinerTaskTest.java View 1 2 3 4 5 6 1 chunk +0 lines, -229 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +105 lines, -56 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflineBackgroundTaskTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +287 lines, -0 lines 0 comments Download
D chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGcmNetworkManager.java View 1 chunk +0 lines, -50 lines 0 comments Download
D chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/StubBackgroundSchedulerProcessor.java View 1 chunk +0 lines, -52 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPackerTest.java View 1 3 chunks +0 lines, -11 lines 0 comments Download
M components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 56 (42 generated)
fgorski
PTAL. This is heads up, as this is targeting 60. I'll add a few more ...
3 years, 7 months ago (2017-05-23 22:29:18 UTC) #19
Pete Williamson
https://codereview.chromium.org/2830843002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java (left): https://codereview.chromium.org/2830843002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java#oldcode37 chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java:37: * If HOLD_WAKELOCK is set to true in a ...
3 years, 7 months ago (2017-05-24 21:41:03 UTC) #22
fgorski
Addressed. Adding Tommy. PTAL https://codereview.chromium.org/2830843002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java (left): https://codereview.chromium.org/2830843002/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java#oldcode37 chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java:37: * If HOLD_WAKELOCK is set ...
3 years, 7 months ago (2017-05-24 23:10:13 UTC) #25
Pete Williamson
https://codereview.chromium.org/2830843002/diff/140001/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java File chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java (right): https://codereview.chromium.org/2830843002/diff/140001/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java#newcode116 chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java:116: public void testScheduleBackup() { On 2017/05/24 23:10:13, fgorski wrote: ...
3 years, 7 months ago (2017-05-25 17:30:54 UTC) #29
fgorski
PTAL https://codereview.chromium.org/2830843002/diff/140001/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java File chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java (right): https://codereview.chromium.org/2830843002/diff/140001/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java#newcode116 chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java:116: public void testScheduleBackup() { On 2017/05/25 17:30:53, Pete ...
3 years, 7 months ago (2017-05-25 21:41:50 UTC) #31
Pete Williamson
All changes look good, there is one remaining issue: How do we ensure that if ...
3 years, 7 months ago (2017-05-25 23:32:31 UTC) #33
fgorski
On 2017/05/25 23:32:31, Pete Williamson wrote: > All changes look good, there is one remaining ...
3 years, 6 months ago (2017-05-26 22:18:59 UTC) #36
nyquist
lgtm, but could you expand the CL description? For bug fixes I often suggest something ...
3 years, 6 months ago (2017-05-30 18:45:26 UTC) #37
Pete Williamson
lgtm We chatted offline, and this looks good, with one potential issue, that looking at ...
3 years, 6 months ago (2017-05-30 19:54:31 UTC) #38
fgorski
Opened bug 727832 and bug 727841 to track the extra work items.
3 years, 6 months ago (2017-05-30 20:15:06 UTC) #39
fgorski
Pete, I made a small tweak to DeviceConditions, as I discovered in manual testing that ...
3 years, 6 months ago (2017-06-01 16:26:26 UTC) #47
Pete Williamson
lgtm still lgtm
3 years, 6 months ago (2017-06-01 18:03:20 UTC) #50
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/2830843002/240001
3 years, 6 months ago (2017-06-01 18:04:28 UTC) #53
commit-bot: I haz the power
3 years, 6 months ago (2017-06-01 18:10:31 UTC) #56
Message was sent while issue was closed.
Committed patchset #12 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/c3cf4c7d10c4796ef841fc181d02...

Powered by Google App Engine
This is Rietveld 408576698