| Index: components/cronet/histogram_manager.h
|
| diff --git a/components/cronet/histogram_manager.h b/components/cronet/histogram_manager.h
|
| index e4305e7c0e16540ee2103e31ff0c70ff915187ca..4c34ceb826e74a1556a3417c8bf7551a75966979 100644
|
| --- a/components/cronet/histogram_manager.h
|
| +++ b/components/cronet/histogram_manager.h
|
| @@ -15,13 +15,14 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/metrics/histogram_flattener.h"
|
| #include "base/metrics/histogram_snapshot_manager.h"
|
| +#include "base/synchronization/lock.h"
|
| #include "components/metrics/proto/chrome_user_metrics_extension.pb.h"
|
|
|
| namespace cronet {
|
|
|
| // A HistogramManager instance is created by the app. It is the central
|
| // controller for the acquisition of log data, and recording deltas for
|
| -// transmission to an external server.
|
| +// transmission to an external server. Public APIs are all thread-safe.
|
| class HistogramManager : public base::HistogramFlattener {
|
| public:
|
| HistogramManager();
|
| @@ -52,6 +53,10 @@ class HistogramManager : public base::HistogramFlattener {
|
| // Stores the protocol buffer representation for this log.
|
| metrics::ChromeUserMetricsExtension uma_proto_;
|
|
|
| + // Should be acquired whenever GetDeltas() is executing to maintain
|
| + // thread-safety.
|
| + base::Lock get_deltas_lock_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HistogramManager);
|
| };
|
|
|
|
|