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

Side by Side Diff: chrome/browser/policy/policy_load_status.h

Issue 14294008: Add UMA histograms for policy loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 2013 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 #ifndef CHROME_BROWSER_POLICY_POLICY_LOAD_STATUS_H_
6 #define CHROME_BROWSER_POLICY_POLICY_LOAD_STATUS_H_
7
8 #include <string>
Joao da Silva 2013/04/16 17:31:04 Not used
Mattias Nissler (ping if slow) 2013/04/16 18:51:14 Done.
9
10 #include "base/basictypes.h"
11
12 namespace base {
13 class HistogramBase;
14 }
15
16 namespace policy {
17
18 // UMA histogram enum for policy load status. Don't change existing constants,
19 // append additional constants to the end if needed.
20 enum PolicyLoadStatus {
21 // Policy load attempt started. This gets logged for each policy load attempt
22 // to get a baseline on the number of requests, and an arbitrary number of
23 // the below status codes may get added in addition.
24 POLICY_LOAD_STATUS_STARTED = 1,
25 // System failed to determine whether there's policy.
26 POLICY_LOAD_STATUS_QUERY_FAILED,
27 // No policy present.
28 POLICY_LOAD_STATUS_NO_POLICY,
29 // Data inaccessible, such as non-local policy file.
30 POLICY_LOAD_STATUS_INACCCESSIBLE,
31 // Data missing, such as policy file not present.
32 POLICY_LOAD_STATUS_MISSING,
33 // Trying with Wow64 redirection disabled.
34 POLICY_LOAD_STATUS_WOW64_REDIRECTION_DISABLED,
35 // Data read error, for example file reading errors.
36 POLICY_LOAD_STATUS_READ_ERROR,
37 // Data too large to process.
38 POLICY_LOAD_STATUS_TOO_BIG,
39 // Parse error.
40 POLICY_LOAD_STATUS_PARSE_ERROR,
41
42 // This must stay last.
43 POLICY_LOAD_STATUS_SIZE
44 };
45
46 // A helper for generating policy load status UMA statistics that'll log
47 // histogram samples for a policy load operation to the appropriate histogram.
48 class PolicyLoadStatusSample {
49 public:
50 // |scope| and |level| may be a PolicyScope or PolicyLevel value
51 // respectively, or alternatively -1 to indicate n/a.
52 PolicyLoadStatusSample(int scope, int level);
53
54 // Adds a status code.
55 void Add(PolicyLoadStatus status);
56
57 private:
58 base::HistogramBase* histogram_;
59
60 DISALLOW_COPY_AND_ASSIGN(PolicyLoadStatusSample);
61 };
62
63 } // namespace policy
64
65 #endif // CHROME_BROWSER_POLICY_POLICY_LOAD_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698