Commit be62008d authored by Jaeyong Bae's avatar Jaeyong Bae Committed by Commit Bot

[Background Fetch] Apply proto <-> struct conversion logic

This patch is just a code simplification by applying conversion logic.

Bug: 853874
Change-Id: I3f9db03fa3b140856b388599ac65ed4ca0dadc98
Reviewed-on: https://chromium-review.googlesource.com/c/1278918Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Commit-Queue: Jaeyong Bae <jdragon.bae@gmail.com>
Cr-Commit-Position: refs/heads/master@{#599637}
parent 28bd086c
......@@ -337,13 +337,7 @@ class FillFromMetadataTask : public InitializationSubTask {
// Fill BackgroundFetchRegistration.
auto& registration = sub_task_init().initialization_data->registration;
// TODO(crbug.com/853874): Unify conversion logic.
registration.developer_id = metadata.registration().developer_id();
registration.unique_id = metadata.registration().unique_id();
registration.upload_total = metadata.registration().upload_total();
registration.uploaded = metadata.registration().uploaded();
registration.download_total = metadata.registration().download_total();
registration.downloaded = metadata.registration().downloaded();
ToBackgroundFetchRegistration(metadata, &registration);
// Total number of requests.
sub_task_init().initialization_data->num_requests = metadata.num_fetches();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment