OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_BASE_COMPLETION_CALLBACK_H__ | 5 #ifndef NET_BASE_COMPLETION_CALLBACK_H__ |
6 #define NET_BASE_COMPLETION_CALLBACK_H__ | 6 #define NET_BASE_COMPLETION_CALLBACK_H__ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/cancelable_callback.h" | 9 #include "base/cancelable_callback.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 // A callback specialization that takes a single int parameter. Usually this is | 13 // A callback specialization that takes a single int parameter. Usually this is |
14 // used to report a byte count or network error code. | 14 // used to report a byte count or network error code. |
15 typedef base::Callback<void(int)> CompletionCallback; | 15 typedef base::Callback<void(int)> CompletionCallback; |
16 | 16 |
17 // 64bit version of callback specialization that takes a single int64 parameter. | 17 // 64bit version of callback specialization that takes a single int64_t |
18 // Usually this is used to report a file offset, size or network error code. | 18 // parameter. Usually this is used to report a file offset, size or network |
19 typedef base::Callback<void(int64)> Int64CompletionCallback; | 19 // error code. |
| 20 typedef base::Callback<void(int64_t)> Int64CompletionCallback; |
20 | 21 |
21 typedef base::CancelableCallback<void(int)> CancelableCompletionCallback; | 22 typedef base::CancelableCallback<void(int)> CancelableCompletionCallback; |
22 | 23 |
23 } // namespace net | 24 } // namespace net |
24 | 25 |
25 #endif // NET_BASE_COMPLETION_CALLBACK_H__ | 26 #endif // NET_BASE_COMPLETION_CALLBACK_H__ |
OLD | NEW |