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

Side by Side Diff: components/policy/core/common/cloud/enterprise_metrics.h

Issue 226093005: Reduce unneeded policy fetches by detecting expired invalidations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_
7 7
8 #include "components/policy/policy_export.h" 8 #include "components/policy/policy_export.h"
9 9
10 namespace policy { 10 namespace policy {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // A refresh occurred while the policy was invalidated and the policy was 185 // A refresh occurred while the policy was invalidated and the policy was
186 // changed. 186 // changed.
187 METRIC_POLICY_REFRESH_INVALIDATED_CHANGED, 187 METRIC_POLICY_REFRESH_INVALIDATED_CHANGED,
188 // A refresh occurred while the policy was invalidated and the policy was 188 // A refresh occurred while the policy was invalidated and the policy was
189 // unchanged. 189 // unchanged.
190 METRIC_POLICY_REFRESH_INVALIDATED_UNCHANGED, 190 METRIC_POLICY_REFRESH_INVALIDATED_UNCHANGED,
191 191
192 METRIC_POLICY_REFRESH_SIZE // Must be the last. 192 METRIC_POLICY_REFRESH_SIZE // Must be the last.
193 }; 193 };
194 194
195 // Types of policy invalidations.
196 enum PolicyInvalidationType {
197 // The invalidation contained no payload.
198 POLICY_INVALIDATION_TYPE_NO_PAYLOAD,
199 // A normal invalidation containing a payload.
200 POLICY_INVALIDATION_TYPE_NORMAL,
201 // The invalidation contained no payload and was considered expired.
202 POLICY_INVALIDATION_TYPE_NO_PAYLOAD_EXPIRED,
203 // The invalidation contained a payload and was considered expired.
204 POLICY_INVALIDATION_TYPE_EXPIRED,
205
206 POLICY_INVALIDATION_TYPE_SIZE // Must be the last.
207 };
208
195 // Names for the UMA counters. They are shared from here since the events 209 // Names for the UMA counters. They are shared from here since the events
196 // from the same enum above can be triggered in different files, and must use 210 // from the same enum above can be triggered in different files, and must use
197 // the same UMA histogram name. 211 // the same UMA histogram name.
198 POLICY_EXPORT extern const char kMetricToken[]; 212 POLICY_EXPORT extern const char kMetricToken[];
199 POLICY_EXPORT extern const char kMetricPolicy[]; 213 POLICY_EXPORT extern const char kMetricPolicy[];
200 POLICY_EXPORT extern const char kMetricEnrollment[]; 214 POLICY_EXPORT extern const char kMetricEnrollment[];
201 POLICY_EXPORT extern const char kMetricPolicyRefresh[]; 215 POLICY_EXPORT extern const char kMetricPolicyRefresh[];
202 POLICY_EXPORT extern const char kMetricPolicyInvalidations[]; 216 POLICY_EXPORT extern const char kMetricPolicyInvalidations[];
203 217
204 } // namespace policy 218 } // namespace policy
205 219
206 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_ 220 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_ENTERPRISE_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698