| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 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 // File error statistics gathering. |
| 6 |
| 7 #ifndef NET_BASE_FILE_STREAM_METRICS_H_ |
| 8 #define NET_BASE_FILE_STREAM_METRICS_H_ |
| 9 #pragma once |
| 10 |
| 11 namespace net { |
| 12 |
| 13 enum FileErrorSource { |
| 14 FILE_ERROR_SOURCE_OPEN = 0, |
| 15 FILE_ERROR_SOURCE_WRITE, |
| 16 FILE_ERROR_SOURCE_READ, |
| 17 FILE_ERROR_SOURCE_SEEK, |
| 18 FILE_ERROR_SOURCE_FLUSH, |
| 19 FILE_ERROR_SOURCE_SET_EOF, |
| 20 FILE_ERROR_SOURCE_GET_SIZE, |
| 21 FILE_ERROR_SOURCE_COUNT, |
| 22 }; |
| 23 |
| 24 // UMA error statistics gathering. |
| 25 // Put the error value into a bucket. |
| 26 int GetFileErrorUmaBucket(int error); |
| 27 |
| 28 // The largest bucket number, plus 1. |
| 29 int MaxFileErrorUmaBucket(); |
| 30 |
| 31 // The highest error value we want to individually report. |
| 32 int MaxFileErrorUmaValue(); |
| 33 |
| 34 // |error| is a platform-specific error (Windows or Posix). |
| 35 // |source| indicates the operation that resulted in the error. |
| 36 // |record| is a flag indicating that we are interested in this error. |
| 37 void RecordFileError(int error, FileErrorSource source, bool record); |
| 38 |
| 39 } // namespace net |
| 40 |
| 41 #endif // NET_BASE_FILE_STREAM_METRICS_H_ |
| OLD | NEW |