New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 705584 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Offline page background scheduling needs updated waiter timeout and rescheduling on upgrade

Project Member Reported by fgor...@chromium.org, Mar 27 2017

Issue description

Offline page background scheduling needs updated waiter timeout and rescheduling on upgrade.

currently ChromeBackgroundServiceWaiter has a timeout of 4 minutes, which is above the allotted wakelock time of 3 minutes per https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmTaskService
'''
The scheduler will hold a PowerManager.WakeLock for your service, however after three minutes of execution if your task has not returned it will be considered to have timed out, and the wakelock will be released. Rescheduling your task (returning RESULT_RESCHEDULE) at this point will have no effect.
'''

Another fix requires putting a rescheduling call in https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmTaskService.html#onInitializeTasks()
to make sure that we get the task back in the queue, when GPS gets an upgrade
 
This is related to extending the timeout in issue 701035

 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb5b80f0f2882522fb2ead659374aa05ac218c9f

commit bb5b80f0f2882522fb2ead659374aa05ac218c9f
Author: petewil <petewil@chromium.org>
Date: Wed Mar 29 17:14:32 2017

Fix ChromeBackgroundServiceWaiter timeout, and restart offline pages

We had been using a 4 minute max timeout in ChromeBackgroundServcieWatier.
However, the GCM NM docs state that we are only guaranteed 3 minutes.
So, I'm backing off the 4 minute timeout to just under 3 minutes.

Also, since I wrote the file, others have added a mechanism to restore
tasks if Google Play Services (GPS) upgrades, I added a similar mechanism
for OfflinePages.

BUG= 705584 

Review-Url: https://codereview.chromium.org/2780643002
Cr-Commit-Position: refs/heads/master@{#460432}

[modify] https://crrev.com/bb5b80f0f2882522fb2ead659374aa05ac218c9f/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
[modify] https://crrev.com/bb5b80f0f2882522fb2ead659374aa05ac218c9f/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
[modify] https://crrev.com/bb5b80f0f2882522fb2ead659374aa05ac218c9f/chrome/android/javatests/src/org/chromium/chrome/browser/ChromeBackgroundServiceTest.java
[modify] https://crrev.com/bb5b80f0f2882522fb2ead659374aa05ac218c9f/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java

Components: UI>Browser>Offline
Labels: Merge-Request-58
Project Member

Comment 4 by sheriffbot@chromium.org, Mar 29 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 29 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e3f6951e12f953fb21ea932e7df0db8040457d8

commit 1e3f6951e12f953fb21ea932e7df0db8040457d8
Author: Pete Williamson <petewil@chromium.org>
Date: Wed Mar 29 18:09:26 2017

Fix ChromeBackgroundServiceWaiter timeout, and restart offline pages

We had been using a 4 minute max timeout in ChromeBackgroundServcieWatier.
However, the GCM NM docs state that we are only guaranteed 3 minutes.
So, I'm backing off the 4 minute timeout to just under 3 minutes.

Also, since I wrote the file, others have added a mechanism to restore
tasks if Google Play Services (GPS) upgrades, I added a similar mechanism
for OfflinePages.

BUG= 705584 

Review-Url: https://codereview.chromium.org/2780643002
Cr-Commit-Position: refs/heads/master@{#460432}
(cherry picked from commit bb5b80f0f2882522fb2ead659374aa05ac218c9f)

Review-Url: https://codereview.chromium.org/2776243006 .
Cr-Commit-Position: refs/branch-heads/3029@{#477}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/1e3f6951e12f953fb21ea932e7df0db8040457d8/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
[modify] https://crrev.com/1e3f6951e12f953fb21ea932e7df0db8040457d8/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
[modify] https://crrev.com/1e3f6951e12f953fb21ea932e7df0db8040457d8/chrome/android/javatests/src/org/chromium/chrome/browser/ChromeBackgroundServiceTest.java
[modify] https://crrev.com/1e3f6951e12f953fb21ea932e7df0db8040457d8/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment