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

Unified Diff: content/browser/background_sync/background_sync_metrics.cc

Issue 1465533006: [BackgroundSync] Split failed and succeeded cases of BackgroundSyncMetrics::CountRegister (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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 | « content/browser/background_sync/background_sync_metrics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/background_sync/background_sync_metrics.cc
diff --git a/content/browser/background_sync/background_sync_metrics.cc b/content/browser/background_sync/background_sync_metrics.cc
index 4bfef5c995674ea9bc3b46ffb926105803876544..9e2c9f56eb95acc982e25e90d764ed7a70f59195 100644
--- a/content/browser/background_sync/background_sync_metrics.cc
+++ b/content/browser/background_sync/background_sync_metrics.cc
@@ -32,6 +32,7 @@ ResultPattern EventResultToResultPattern(bool success,
namespace content {
+// status
iclelland 2015/11/23 19:54:59 static? (ditto for the other three instances)
jkarlin 2015/11/23 20:00:46 Oy. Thanks! Done.
void BackgroundSyncMetrics::RecordEventResult(SyncPeriodicity periodicity,
bool success,
bool finished_in_foreground) {
@@ -52,6 +53,7 @@ void BackgroundSyncMetrics::RecordEventResult(SyncPeriodicity periodicity,
NOTREACHED();
}
+// status
void BackgroundSyncMetrics::RecordBatchSyncEventComplete(
const base::TimeDelta& time,
int number_of_batched_sync_events) {
@@ -64,14 +66,15 @@ void BackgroundSyncMetrics::RecordBatchSyncEventComplete(
number_of_batched_sync_events);
}
-void BackgroundSyncMetrics::CountRegister(
+// status
+void BackgroundSyncMetrics::CountRegisterSuccess(
SyncPeriodicity periodicity,
RegistrationCouldFire registration_could_fire,
- RegistrationIsDuplicate registration_is_duplicate,
- BackgroundSyncStatus result) {
+ RegistrationIsDuplicate registration_is_duplicate) {
switch (periodicity) {
case SYNC_ONE_SHOT:
- UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.OneShot", result,
+ UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.OneShot",
+ BACKGROUND_SYNC_STATUS_OK,
BACKGROUND_SYNC_STATUS_MAX + 1);
UMA_HISTOGRAM_BOOLEAN("BackgroundSync.Registration.OneShot.CouldFire",
registration_could_fire == REGISTRATION_COULD_FIRE);
@@ -80,7 +83,8 @@ void BackgroundSyncMetrics::CountRegister(
registration_is_duplicate == REGISTRATION_IS_DUPLICATE);
return;
case SYNC_PERIODIC:
- UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.Periodic", result,
+ UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.Periodic",
+ BACKGROUND_SYNC_STATUS_OK,
BACKGROUND_SYNC_STATUS_MAX + 1);
UMA_HISTOGRAM_BOOLEAN(
"BackgroundSync.Registration.Periodic.IsDuplicate",
@@ -90,6 +94,23 @@ void BackgroundSyncMetrics::CountRegister(
NOTREACHED();
}
+// status
+void BackgroundSyncMetrics::CountRegisterFailure(SyncPeriodicity periodicity,
+ BackgroundSyncStatus result) {
+ switch (periodicity) {
+ case SYNC_ONE_SHOT:
+ UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.OneShot", result,
+ BACKGROUND_SYNC_STATUS_MAX + 1);
+ return;
+ case SYNC_PERIODIC:
+ UMA_HISTOGRAM_ENUMERATION("BackgroundSync.Registration.Periodic", result,
+ BACKGROUND_SYNC_STATUS_MAX + 1);
+ return;
+ }
+ NOTREACHED();
+}
+
+// status
void BackgroundSyncMetrics::CountUnregister(SyncPeriodicity periodicity,
BackgroundSyncStatus result) {
switch (periodicity) {
« no previous file with comments | « content/browser/background_sync/background_sync_metrics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698