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

Issue 760627 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

prefetch download with download service does not happen

Project Member Reported by xingliu@chromium.org, Aug 30 2017

Issue description

Steps to repro on Android:

1. Enable kPrefetchingOfflinePagesFeature feature. So a prefetch flag will show in chrome://flags.

2. Enable Prefetch: go to chrome://flags, search for "prefetch", switch "Enables suggested offline pages to be prefetched" to Enabled. 

3. Restart.
Open chrome://offline-internals. Observe Event Log, it should start logging pipeline work, including Downloader: Start download of ...". Eventually, downloaded pages should appear in Stored Pages list.

3. If you want to repeat (downloads may only be initiated once a day) close chrome and remove the prefetch database: adb shell rm /data/data/com.chrome.canary/app_chrome/Default/Offline\\ Pages/prefech_store/PrefetchStore.db Substitute "com.chrome.canary" for what channel you try.



 
I tried to debug it last night, the download happened after a couple of hours, which is kind of weird.  It used to happen right after 5 minutes(kDefaultWindowStartTime).

Attach a screen shot.
screencap.png
448 KB View Download

Comment 3 by carl...@google.com, Aug 30 2017

Cc: carlosk@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 30 2017

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

commit bce0af2437b8f7ac612cebdb9a51c3dbd28da4b1
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Aug 30 21:44:16 2017

Download service: Fix a bug that make prefetch download not working.

We didn't poll the initial state correctly after implementing background
network change observer. The unit test is based on linux implementation,
but android is based on a JNI bridge.


Bug:  760627 
Change-Id: Ic69dada59cd7a02c836b97af4ce054484d2ba908
Reviewed-on: https://chromium-review.googlesource.com/644168
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498622}
[modify] https://crrev.com/bce0af2437b8f7ac612cebdb9a51c3dbd28da4b1/components/download/internal/scheduler/device_status_listener.cc

Status: Fixed (was: Started)

Sign in to add a comment