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

Issue 795802 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Remove fetch from UIBackgroundModes

Project Member Reported by pkl@chromium.org, Dec 18 2017

Issue description

Chrome no longer does network IO which in the background. The specification of "fetch" is no longer necessary.

See ios/chrome/app/resources/Info.plist

Background:
We added that to send crash dumps *without* waiting till the user relaunch Chrome (and some users may never relaunch Chrome after the "last" crash). We enabled that for a couple of releases and then we suspected that it may be causing crashes, so we disabled it as an experiment. We never turned it back on.

Additional research: Is there "dead code" that can be removed?
 

Comment 1 by pkl@chromium.org, Dec 18 2017

Owner: pkl@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by pkl@chromium.org, Dec 18 2017

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 18 2018

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

commit 32db65c82541f4df0d3fb9c4caa782b401946550
Author: Peter K. Lee <pkl@chromium.org>
Date: Thu Jan 18 05:34:30 2018

Removed fetch attribute from UIBackgroundModes in Info.plist

Chrome is no longer using background network access to update crash
dumps. Removing this capability so there is no chance for Chrome to
use this by mistake.

Removed majority of the code that deals with background processing
which existed solely for background crash uploads.

Bug:  795802 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4fb945bd30487605070b256d4c9f1105faed2323
Reviewed-on: https://chromium-review.googlesource.com/832942
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530061}
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/application_delegate/BUILD.gn
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/application_delegate/app_state.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/application_delegate/app_state_unittest.mm
[delete] https://crrev.com/fb60cc353806567bddfe27c2356445bebf98d9ad/ios/chrome/app/application_delegate/background_activity.h
[delete] https://crrev.com/fb60cc353806567bddfe27c2356445bebf98d9ad/ios/chrome/app/application_delegate/background_activity.mm
[delete] https://crrev.com/fb60cc353806567bddfe27c2356445bebf98d9ad/ios/chrome/app/application_delegate/background_activity_unittest.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/application_delegate/metrics_mediator.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/application_delegate/metrics_mediator_unittest.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/main_application_delegate.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/main_controller.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/app/resources/Info.plist
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/browser/crash_report/BUILD.gn
[delete] https://crrev.com/fb60cc353806567bddfe27c2356445bebf98d9ad/ios/chrome/browser/crash_report/crash_report_background_uploader.h
[delete] https://crrev.com/fb60cc353806567bddfe27c2356445bebf98d9ad/ios/chrome/browser/crash_report/crash_report_background_uploader.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.mm
[modify] https://crrev.com/32db65c82541f4df0d3fb9c4caa782b401946550/testing/gtest_ios/unittest-Info.plist

Comment 4 by pkl@chromium.org, Jan 18 2018

Status: Fixed (was: Started)
I am not sure it is an issue, but I am now seeing the message
2018-03-22 16:50:10.351 ios_internal_chrome_external_url_egtests[22318:241404] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.

We may want to remove the application:performFetchWithCompletionHandler: to remove the warning.
WDYT?

Comment 6 by pkl@chromium.org, Mar 23 2018

Labels: -M-65 M-66
Status: Started (was: Fixed)
Reopening

Comment 7 by pkl@chromium.org, Apr 13 2018

Labels: -M-66 M-68
Per "landing" this feature, do we know if it has worked? Is Chrome still using significant amounts of background battery?
Project Member

Comment 9 by bugdroid1@chromium.org, May 11 2018

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

commit ae36553a8e0e16bada76bbd3fc28c4add1a3b927
Author: Peter K. Lee <pkl@chromium.org>
Date: Fri May 11 14:19:02 2018

Removed implementation of application:performFetchWithCompletionHandler:

Without specifying "fetch" in Info.plist, runtime generates spurious
warning messages.

Bug:  795802 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ie9e73e52d626a170645a98db8e7ae90b61755ce1
Reviewed-on: https://chromium-review.googlesource.com/1050687
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557868}
[modify] https://crrev.com/ae36553a8e0e16bada76bbd3fc28c4add1a3b927/ios/chrome/app/main_application_delegate.mm

Comment 10 by pkl@chromium.org, May 11 2018

Status: Fixed (was: Started)
Re: comment 8 - There are no quantitative measures of success. We are doing this to have a defensible explanation that Chrome cannot "run wild" and use up battery while in the background.

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 5

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

commit 1de836531d5503fa01ebaac9882f39363a0c7d41
Author: Peter K. Lee <pkl@chromium.org>
Date: Mon Nov 05 13:27:44 2018

Annotate CrashReport histograms as obsolete

After http://crrev/c/832942, these histograms are no longer being emitted

Bug:  795802 
Change-Id: I7dfdf2ab640e23795670ab6226bd1124ddff0b38
Reviewed-on: https://chromium-review.googlesource.com/c/1315672
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605312}
[modify] https://crrev.com/1de836531d5503fa01ebaac9882f39363a0c7d41/tools/metrics/histograms/histograms.xml

Sign in to add a comment