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

Unified Diff: components/feature_engagement_tracker/internal/availability_store.cc

Issue 2911123003: Metrics for feature engagement tracker. (Closed)
Patch Set: Created 3 years, 7 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
Index: components/feature_engagement_tracker/internal/availability_store.cc
diff --git a/components/feature_engagement_tracker/internal/availability_store.cc b/components/feature_engagement_tracker/internal/availability_store.cc
index e6a9dfd35c9a16c5b36c746b71e7e42fbe535d9b..3c0163c839dd697af1c7a7470837d061523d9237 100644
--- a/components/feature_engagement_tracker/internal/availability_store.cc
+++ b/components/feature_engagement_tracker/internal/availability_store.cc
@@ -14,6 +14,7 @@
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "components/feature_engagement_tracker/internal/proto/availability.pb.h"
+#include "components/feature_engagement_tracker/internal/stats.h"
#include "components/feature_engagement_tracker/public/feature_list.h"
#include "components/leveldb_proto/proto_database.h"
@@ -34,6 +35,7 @@ void OnDBUpdateComplete(
std::unique_ptr<std::map<const base::Feature*, uint32_t>>
feature_availabilities,
bool success) {
+ stats::RecordDbUpdate(success, stats::StoreType::AVAILABILITY_STORE);
std::move(on_loaded_callback).Run(success, std::move(feature_availabilities));
}
@@ -44,6 +46,7 @@ void OnDBLoadComplete(
uint32_t current_day,
bool success,
std::unique_ptr<std::vector<Availability>> availabilities) {
+ stats::RecordAvailabilityDbLoadEvent(success);
if (!success) {
std::move(on_loaded_callback)
.Run(false,
@@ -116,6 +119,8 @@ void OnDBInitComplete(
AvailabilityStore::OnLoadedCallback on_loaded_callback,
uint32_t current_day,
bool success) {
+ stats::RecordDbInitEvent(success, stats::StoreType::AVAILABILITY_STORE);
+
if (!success) {
std::move(on_loaded_callback)
.Run(false,

Powered by Google App Engine
This is Rietveld 408576698