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

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: Simplified the UMA error statistics gathering. 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 // This file defines FileStream, a basic interface for reading and writing files
cbentzel 2011/08/16 13:36:02 This comment is wrong.
6 // synchronously or asynchronously with support for seeking to an offset.
7 // Note that even when used asynchronously, only one operation is supported at
8 // a time.
9
10 #ifndef NET_BASE_FILE_STREAM_METRICS_H_
11 #define NET_BASE_FILE_STREAM_METRICS_H_
12 #pragma once
13
14 namespace net {
15
16 enum FileErrorSource {
17 FILE_ERROR_SOURCE_IS_NOT_OPEN = 0,
18 FILE_ERROR_SOURCE_OPEN,
19 FILE_ERROR_SOURCE_WRITE,
20 FILE_ERROR_SOURCE_READ,
21 FILE_ERROR_SOURCE_SEEK,
22 FILE_ERROR_SOURCE_FLUSH,
23 FILE_ERROR_SOURCE_SET_EOF,
24 FILE_ERROR_SOURCE_GET_SIZE,
25 FILE_ERROR_SOURCE_COUNT,
26 };
27
28 // UMA error statistics gathering.
29 int ReduceErrorRange(int error);
30 int MaxError();
31 void RecordFileError(int error, FileErrorSource type);
cbentzel 2011/08/16 13:36:02 After seeing this be used, may be easier to change
cbentzel 2011/08/16 13:36:02 In Win, this is actually a DWORD for error. DWORD
ahendrickson 2011/08/17 20:12:04 Done.
ahendrickson 2011/08/17 20:12:04 On Win, I mask out the 16 high bits anyway, so it
32
33 } // namespace net
34
35 #endif // NET_BASE_FILE_STREAM_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698