blob: b6330ea5b574aa5bf71a9199394d6bfef6728292 [file] [log] [blame]
Shakti Sahu40bc02c02020-02-10 23:45:311// 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
7namespace background_task {
8
9PeriodicInfo::PeriodicInfo()
10 : interval_ms(0), flex_ms(0), expires_after_window_end_time(false) {}
11
12PeriodicInfo::~PeriodicInfo() = default;
13
14OneOffInfo::OneOffInfo()
15 : window_start_time_ms(0),
16 window_end_time_ms(0),
17 expires_after_window_end_time(false) {}
18
19OneOffInfo::~OneOffInfo() = default;
20
21ExactInfo::ExactInfo() : trigger_at_ms(0) {}
22
23ExactInfo::~ExactInfo() = default;
24
25TaskInfo::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
33TaskInfo::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
41TaskInfo::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
49TaskInfo::~TaskInfo() = default;
50
51} // namespace background_task