Shakti Sahu | 40bc02c0 | 2020-02-10 23:45:31 | [diff] [blame] | 1 | // Copyright 2020 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "components/background_task_scheduler/task_info.h" |
| 6 | |
| 7 | namespace background_task { |
| 8 | |
| 9 | PeriodicInfo::PeriodicInfo() |
| 10 | : interval_ms(0), flex_ms(0), expires_after_window_end_time(false) {} |
| 11 | |
| 12 | PeriodicInfo::~PeriodicInfo() = default; |
| 13 | |
| 14 | OneOffInfo::OneOffInfo() |
| 15 | : window_start_time_ms(0), |
| 16 | window_end_time_ms(0), |
| 17 | expires_after_window_end_time(false) {} |
| 18 | |
| 19 | OneOffInfo::~OneOffInfo() = default; |
| 20 | |
| 21 | ExactInfo::ExactInfo() : trigger_at_ms(0) {} |
| 22 | |
| 23 | ExactInfo::~ExactInfo() = default; |
| 24 | |
| 25 | TaskInfo::TaskInfo(int task_id, const PeriodicInfo& timing_info) |
| 26 | : task_id(task_id), |
| 27 | network_type(NetworkType::NONE), |
| 28 | requires_charging(false), |
| 29 | is_persisted(false), |
| 30 | update_current(false), |
| 31 | periodic_info(timing_info) {} |
| 32 | |
| 33 | TaskInfo::TaskInfo(int task_id, const OneOffInfo& timing_info) |
| 34 | : task_id(task_id), |
| 35 | network_type(NetworkType::NONE), |
| 36 | requires_charging(false), |
| 37 | is_persisted(false), |
| 38 | update_current(false), |
| 39 | one_off_info(timing_info) {} |
| 40 | |
| 41 | TaskInfo::TaskInfo(int task_id, const ExactInfo& timing_info) |
| 42 | : task_id(task_id), |
| 43 | network_type(NetworkType::NONE), |
| 44 | requires_charging(false), |
| 45 | is_persisted(false), |
| 46 | update_current(false), |
| 47 | exact_info(timing_info) {} |
| 48 | |
| 49 | TaskInfo::~TaskInfo() = default; |
| 50 | |
| 51 | } // namespace background_task |