| 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_DISK_CACHE_NET_LOG_PARAMETERS_H_ | 5 #ifndef NET_DISK_CACHE_NET_LOG_PARAMETERS_H_ |
| 6 #define NET_DISK_CACHE_NET_LOG_PARAMETERS_H_ | 6 #define NET_DISK_CACHE_NET_LOG_PARAMETERS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "net/log/net_log.h" | 12 #include "net/log/net_log.h" |
| 11 | 13 |
| 12 // This file contains a set of functions to create NetLog::ParametersCallbacks | 14 // This file contains a set of functions to create NetLog::ParametersCallbacks |
| 13 // shared by EntryImpls and MemEntryImpls. | 15 // shared by EntryImpls and MemEntryImpls. |
| 14 namespace disk_cache { | 16 namespace disk_cache { |
| 15 | 17 |
| 16 class Entry; | 18 class Entry; |
| 17 | 19 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 // read or write completes. For reads, |truncate| must be false. | 37 // read or write completes. For reads, |truncate| must be false. |
| 36 // |bytes_copied| is either the number of bytes copied or a network error | 38 // |bytes_copied| is either the number of bytes copied or a network error |
| 37 // code. |bytes_copied| must not be ERR_IO_PENDING, as it's not a valid | 39 // code. |bytes_copied| must not be ERR_IO_PENDING, as it's not a valid |
| 38 // result for an operation. | 40 // result for an operation. |
| 39 net::NetLog::ParametersCallback CreateNetLogReadWriteCompleteCallback( | 41 net::NetLog::ParametersCallback CreateNetLogReadWriteCompleteCallback( |
| 40 int bytes_copied); | 42 int bytes_copied); |
| 41 | 43 |
| 42 // Creates a NetLog callback that returns parameters for when a sparse | 44 // Creates a NetLog callback that returns parameters for when a sparse |
| 43 // operation is started. | 45 // operation is started. |
| 44 net::NetLog::ParametersCallback CreateNetLogSparseOperationCallback( | 46 net::NetLog::ParametersCallback CreateNetLogSparseOperationCallback( |
| 45 int64 offset, | 47 int64_t offset, |
| 46 int buf_len); | 48 int buf_len); |
| 47 | 49 |
| 48 // Creates a NetLog callback that returns parameters for when a read or write | 50 // Creates a NetLog callback that returns parameters for when a read or write |
| 49 // for a sparse entry's child is started. | 51 // for a sparse entry's child is started. |
| 50 net::NetLog::ParametersCallback CreateNetLogSparseReadWriteCallback( | 52 net::NetLog::ParametersCallback CreateNetLogSparseReadWriteCallback( |
| 51 const net::NetLog::Source& source, | 53 const net::NetLog::Source& source, |
| 52 int child_len); | 54 int child_len); |
| 53 | 55 |
| 54 // Creates a NetLog callback that returns parameters for when a call to | 56 // Creates a NetLog callback that returns parameters for when a call to |
| 55 // GetAvailableRange returns. | 57 // GetAvailableRange returns. |
| 56 net::NetLog::ParametersCallback CreateNetLogGetAvailableRangeResultCallback( | 58 net::NetLog::ParametersCallback CreateNetLogGetAvailableRangeResultCallback( |
| 57 int64 start, | 59 int64_t start, |
| 58 int result); | 60 int result); |
| 59 | 61 |
| 60 } // namespace disk_cache | 62 } // namespace disk_cache |
| 61 | 63 |
| 62 #endif // NET_DISK_CACHE_NET_LOG_CACHE_PARAMETERS_H_ | 64 #endif // NET_DISK_CACHE_NET_LOG_CACHE_PARAMETERS_H_ |
| OLD | NEW |