blob: 0e96e6cd7673b6f5e4617da5f6b8c51857e0c9ef [file] [log] [blame]
Bence Béky61f756c2018-04-25 14:17:531// Copyright 2018 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#ifndef NET_BASE_COMPLETION_REPEATING_CALLBACK_H_
6#define NET_BASE_COMPLETION_REPEATING_CALLBACK_H_
7
8#include <stdint.h>
9
10#include "base/callback.h"
11#include "base/cancelable_callback.h"
12
13namespace net {
14
15// A RepeatingCallback specialization that takes a single int parameter. Usually
16// this is used to report a byte count or network error code.
17using CompletionRepeatingCallback = base::RepeatingCallback<void(int)>;
18
19// 64bit version of the RepeatingCallback specialization that takes a single
20// int64_t parameter. Usually this is used to report a file offset, size or
21// network error code.
22using Int64CompletionRepeatingCallback = base::RepeatingCallback<void(int64_t)>;
23
24using CancelableCompletionRepeatingCallback =
25 base::CancelableRepeatingCallback<void(int)>;
26
27} // namespace net
28
29#endif // NET_BASE_COMPLETION_REPEATING_CALLBACK_H_