1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_METRICS_H_
#define CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_METRICS_H_
namespace notifications_uma {
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class DisplayStatus {
kSuccess = 0,
kRoActivateFailed = 1,
kConversionFailedInspectableToXmlIo = 2,
kLoadXmlFailed = 3,
kConversionFailedXmlIoToXml = 4,
kCreateFactoryFailed = 5,
kCreateToastNotificationFailed = 6,
kCreateToastNotification2Failed = 7,
kSettingGroupFailed = 8,
kSettingTagFailed = 9,
kGetGroupFailed = 10,
kGetTagFailed = 11,
kSuppressPopupFailed = 12,
kAddToastDismissHandlerFailed = 13,
kAddToastErrorHandlerFailed = 14,
kShowingToastFailed = 15,
kCreateToastNotificationManagerFailed = 16,
kCreateToastNotifierWithIdFailed = 17,
kDeprecatedDisabledForApplication = 18,
kDeprecatedDisabledForUser = 19,
kDeprecatedDisabledByGroupPolicy = 20,
kDeprecatedDisabledByManifest = 21,
kMaxValue = kDeprecatedDisabledByManifest,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class CloseStatus {
kSuccess = 0,
kGetToastHistoryFailed = 1,
kRemovingToastFailed = 2,
kEmptyAumi = 3,
kNotificationNotFound = 4,
kMaxValue = kNotificationNotFound,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class HistoryStatus {
kSuccess = 0,
kCreateToastNotificationManagerFailed = 1,
kQueryToastManagerStatistics2Failed = 2,
kGetToastHistoryFailed = 3,
kMaxValue = kGetToastHistoryFailed,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class GetDisplayedStatus {
kSuccess = 0,
kSuccessWithGetAtFailure = 1,
kGetToastHistoryFailed = 2,
kQueryToastNotificationHistory2Failed = 3,
kGetHistoryWithIdFailed = 4,
kGetSizeFailed = 5,
kMaxValue = kGetSizeFailed,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class GetDisplayedLaunchIdStatus {
kSuccess = 0,
kDecodeLaunchIdFailed = 1,
kMaxValue = kDecodeLaunchIdFailed,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class GetNotificationLaunchIdStatus {
kSuccess = 0,
kNotificationGetContentFailed = 1,
kGetElementsByTagFailed = 2,
kMissingToastElementInDoc = 3,
kItemAtFailed = 4,
kGetAttributesFailed = 5,
kGetNamedItemFailed = 6,
kGetFirstChildFailed = 7,
kGetNodeValueFailed = 8,
kConversionToPropValueFailed = 9,
kGetStringFailed = 10,
kGetNamedItemNull = 11,
kGetFirstChildNull = 12,
kMaxValue = kGetFirstChildNull,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class GetSettingPolicy {
kEnabled = 0,
kDisabledForApplication = 1,
kDisabledForUser = 2,
kDisabledByGroupPolicy = 3,
kDisabledByManifest = 4,
kUnknown = 5,
kMaxValue = kUnknown,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class GetSettingStatus {
kSuccess = 0,
kUnknownFailure = 1,
kMaxValue = kUnknownFailure,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class ActivationStatus {
kSuccess = 0,
kDeprecatedGetProfileIdInvalidLaunchId = 1,
kDeprecatedActivationInvalidLaunchId = 2,
kInvalidLaunchId = 3,
kMaxValue = kInvalidLaunchId,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class HandleEventStatus {
kSuccess = 0,
kHandleEventLaunchIdInvalid = 1,
kMaxValue = kHandleEventLaunchIdInvalid,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class SetReadyCallbackStatus {
kSuccess = 0,
kShortcutMisconfiguration = 1 << 0,
kComServerMisconfiguration = 1 << 1,
kComNotInitializedObsolete = 1 << 2, // No longer possible w/ Win10+ only.
kMaxValue = kComNotInitializedObsolete,
};
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
enum class OnFailedStatus {
kSuccess = 0,
kGetErrorCodeFailed = 1,
kMaxValue = kGetErrorCodeFailed,
};
// Methods to log histograms (to detect error rates in Native Notifications on
// Windows).
void LogDisplayHistogram(DisplayStatus status);
void LogCloseHistogram(CloseStatus status);
void LogHistoryHistogram(HistoryStatus status);
void LogGetDisplayedStatus(GetDisplayedStatus status);
void LogGetDisplayedLaunchIdStatus(GetDisplayedLaunchIdStatus status);
void LogGetNotificationLaunchIdStatus(GetNotificationLaunchIdStatus status);
void LogGetSettingPolicy(GetSettingPolicy policy);
void LogGetSettingStatus(GetSettingStatus status);
void LogGetSettingPolicyStartup(GetSettingPolicy policy);
void LogGetSettingStatusStartup(GetSettingStatus status);
void LogHandleEventStatus(HandleEventStatus status);
void LogActivationStatus(ActivationStatus status);
void LogSetReadyCallbackStatus(SetReadyCallbackStatus status);
void LogOnFailedStatus(OnFailedStatus status);
} // namespace notifications_uma
#endif // CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_METRICS_H_
|