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

Unified Diff: components/variations/metrics.h

Issue 2935623004: [Cleanup] Clean up the VariationsSeedStore's histograms. (Closed)
Patch Set: Rebase Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/variations/BUILD.gn ('k') | components/variations/metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/metrics.h
diff --git a/components/variations/metrics.h b/components/variations/metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..28e846da5123fa55e40c097aa07deadd51fb6518
--- /dev/null
+++ b/components/variations/metrics.h
@@ -0,0 +1,95 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_VARIATIONS_METRICS_H_
+#define COMPONENTS_VARIATIONS_METRICS_H_
+
+#include "build/build_config.h"
+
+namespace variations {
+
+#if defined(OS_ANDROID)
+// The result of importing a seed during Android first run.
+// Note: UMA histogram enum - don't re-order or remove entries.
+enum class FirstRunSeedImportResult {
+ SUCCESS,
+ FAIL_NO_CALLBACK,
+ FAIL_NO_FIRST_RUN_SEED,
+ FAIL_STORE_FAILED,
+ FAIL_INVALID_RESPONSE_DATE,
+ ENUM_SIZE
+};
+#endif // OS_ANDROID
+
+// The result of attempting to load a variations seed on startup.
+// Note: UMA histogram enum - don't re-order or remove entries.
+enum class LoadSeedResult {
+ SUCCESS,
+ EMPTY,
+ CORRUPT,
+ INVALID_SIGNATURE,
+ CORRUPT_BASE64,
+ CORRUPT_PROTOBUF,
+ CORRUPT_GZIP,
+ ENUM_SIZE
+};
+
+// The result of attempting to store a variations seed received from the server.
+// Note: UMA histogram enum - don't re-order or remove entries.
+enum class StoreSeedResult {
+ SUCCESS,
+ FAILED_EMPTY,
+ FAILED_PARSE,
+ FAILED_SIGNATURE,
+ FAILED_GZIP,
+ // DELTA_COUNT is not so much a result of the seed store, but rather counting
+ // the number of delta-compressed seeds the SeedStore() function saw. Kept in
+ // the same histogram for convenience of comparing against the other values.
+ DELTA_COUNT,
+ FAILED_DELTA_READ_SEED,
+ FAILED_DELTA_APPLY,
+ FAILED_DELTA_STORE,
+ FAILED_UNGZIP,
+ FAILED_EMPTY_GZIP_CONTENTS,
+ FAILED_UNSUPPORTED_SEED_FORMAT,
+ ENUM_SIZE
+};
+
+// The result of updating the date associated with an existing stored variations
+// seed.
+// Note: UMA histogram enum - don't re-order or remove entries.
+enum class UpdateSeedDateResult {
+ NO_OLD_DATE,
+ NEW_DATE_IS_OLDER,
+ SAME_DAY,
+ NEW_DAY,
+ ENUM_SIZE
+};
+
+// The result of verifying a variation seed's signature.
+// Note: UMA histogram enum - don't re-order or remove entries.
+enum class VerifySignatureResult {
+ MISSING_SIGNATURE,
+ DECODE_FAILED,
+ INVALID_SIGNATURE,
+ INVALID_SEED,
+ VALID_SIGNATURE,
+ ENUM_SIZE
+};
+
+#if defined(OS_ANDROID)
+// Records the result of importing a seed during Android first run.
+void RecordFirstRunSeedImportResult(FirstRunSeedImportResult result);
+#endif // OS_ANDROID
+
+// Records the result of attempting to load a variations seed on startup.
+void RecordLoadSeedResult(LoadSeedResult state);
+
+// Records the result of attempting to store a variations seed received from the
+// server.
+void RecordStoreSeedResult(StoreSeedResult result);
+
+} // namespace variations
+
+#endif // COMPONENTS_VARIATIONS_METRICS_H_
« no previous file with comments | « components/variations/BUILD.gn ('k') | components/variations/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698