chromium/extensions/browser/api/alarms/alarms_api_constants.h

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_CONSTANTS_H_
#define EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_CONSTANTS_H_

#include <cinttypes>

#include "base/time/time.h"

namespace extensions {
namespace alarms_api_constants {

// Minimum specifiable alarm period (in minutes) for unpacked extensions.
inline constexpr base::TimeDelta kDevDelayMinimum =;
// Minimum specifiable alarm period (in minutes) for packed/crx MV2 extensions.
inline constexpr base::TimeDelta kMV2ReleaseDelayMinimum =;
// Minimum specifiable alarm period (in minutes) for packed/crx MV3 extensions.
// This is designed to align with the idle timeout of service workers.
inline constexpr base::TimeDelta kMV3ReleaseDelayMinimum =;

// Returns the minimum time delay (either one-time or periodic) for an extension
// with the given unpacked state and `manifest_version`.
base::TimeDelta GetMinimumDelay(bool is_unpacked, int manifest_version);

inline constexpr char kWarningMinimumDevDelay[] =;

inline constexpr char kWarningMinimumReleaseDelay[] =;

}  // namespace alarms_api_constants
}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_CONSTANTS_H_