1 // 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 
13 namespace 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.
17 using 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.
22 using Int64CompletionRepeatingCallback = base::RepeatingCallback<void(int64_t)>;
23 
24 using CancelableCompletionRepeatingCallback =
25     base::CancelableRepeatingCallback<void(int)>;
26 
27 }  // namespace net
28 
29 #endif  // NET_BASE_COMPLETION_REPEATING_CALLBACK_H_
30