Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: net/base/file_stream_metrics.h

Issue 7583049: Record UMA statistics for file_stream operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Posix compile error. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 GetErrorBucket(int error);
27 // The largest bucket number, plus 1.
cbentzel 2011/08/18 13:31:28 Nit: there's usually a new-line between function d
ahendrickson 2011/08/18 15:56:45 Done.
28 int MaxBucket();
29 // The highest error value we want to individually report.
30 int MaxError();
31 // |error| is a platform-specific error (Windows or Posix).
32 // |source| indicates the operation that resulted in the error.
33 // |record| is a flag indicating that we are interested in this error.
34 void RecordFileError(int error, FileErrorSource source, bool record);
35
36 } // namespace net
37
38 #endif // NET_BASE_FILE_STREAM_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698