| Index: sync/engine/process_updates_util.cc
|
| diff --git a/sync/engine/process_updates_util.cc b/sync/engine/process_updates_util.cc
|
| index 9b428ef929bd9c8ba80705e028dd91f8ce2a39bb..f1da9d8b10e707301b46cf0289a20e706b391cf9 100644
|
| --- a/sync/engine/process_updates_util.cc
|
| +++ b/sync/engine/process_updates_util.cc
|
| @@ -5,6 +5,7 @@
|
| #include "sync/engine/process_updates_util.h"
|
|
|
| #include "base/location.h"
|
| +#include "base/metrics/sparse_histogram.h"
|
| #include "sync/engine/syncer_proto_util.h"
|
| #include "sync/engine/syncer_types.h"
|
| #include "sync/engine/syncer_util.h"
|
| @@ -16,6 +17,13 @@
|
| #include "sync/syncable/syncable_util.h"
|
| #include "sync/util/cryptographer.h"
|
|
|
| +#define UMA_HISTOGRAM_SPARSE_SLOWLY_WITH_VALUE(name, sample, value) \
|
| + do { \
|
| + base::HistogramBase* histogram = base::SparseHistogram::FactoryGet( \
|
| + name, base::HistogramBase::kUmaTargetedHistogramFlag); \
|
| + histogram->AddCount(sample, value); \
|
| + } while (0)
|
| +
|
| namespace syncer {
|
|
|
| using sessions::StatusController;
|
| @@ -303,6 +311,14 @@ void ProcessDownloadedUpdates(
|
| if (verify_result != VERIFY_SUCCESS && verify_result != VERIFY_UNDELETE)
|
| continue;
|
| ProcessUpdate(**update_it, dir->GetCryptographer(trans), trans);
|
| + if ((*update_it)->ByteSize() > 0) {
|
| + UMA_HISTOGRAM_SPARSE_SLOWLY_WITH_VALUE("DataUse.Sync.Download.Bytes",
|
| + ModelTypeToHistogramInt(type),
|
| + (*update_it)->ByteSize());
|
| + }
|
| + UMA_HISTOGRAM_SPARSE_SLOWLY_WITH_VALUE("DataUse.Sync.Download.Count",
|
| + ModelTypeToHistogramInt(type),
|
| + 1);
|
| }
|
| }
|
|
|
|
|