commit | 87886930a2bd83676885342a3cd19665613cdc07 | [log] [tgz] |
---|---|---|
author | Peter Beverloo <peter@chromium.org> | Wed Jul 25 15:34:17 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jul 25 15:34:17 2018 |
tree | 6006841c7bb4b28ca323f056e4883f08302ac82c | |
parent | 03ac77beaa9b237fa259649d65a417a52b802abc [diff] |
Move Background Fetch registration creation to the Data Manager observer When a Background Fetch registration is created, a BGFetchJobContoller is created immediately after committing it to storage even if the job can't be started just yet -- this should be the scheduler's decision. This CL is the first step in removing the assumption that each existing Background Fetch registration is represented by a BGFetchJobController. Acknowledging creation of the registration is separated from indicating that a new registration is available, by adding an OnRegistrationCreated method to the BackgroundFetchDataManagerObserver. As part of this refactoring, in an effort to avoid passing around unique pointers to BackgroundFetchRegistration objects, these are now passed by const& where the receiver makes a copy when necessary. This enabled reducing knowledge of the protobufs throughout our system, which is a nice clean-up on its own. TBR=avi for BUILD.gn Bug: 850512 Change-Id: I8d3c42a11ab89f7b7c3573a6f9a21e096493b838 Reviewed-on: https://chromium-review.googlesource.com/1149871 Commit-Queue: Peter Beverloo <peter@chromium.org> Reviewed-by: Mugdha Lakhani <nator@chromium.org> Reviewed-by: Rayan Kanso <rayankans@chromium.org> Cr-Commit-Position: refs/heads/master@{#577903}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .